BIOM Display {BIOM.utils} | R Documentation |
Nicely print or summarize an object of class biom
. A summary omits printing the data table.
## S3 method for class 'biom' str(object, ...) ## S3 method for class 'biom' summary(object, ...) ## S3 method for class 'biom' print(x, ...) ## S3 method for class 'biom' head(x, n=5, p=n, ...) ## S3 method for class 'biom' tail(x, n=5, p=n, ...)
x |
an object ( |
object |
an object ( |
n |
number of rows (single |
p |
number of columns (single |
... |
further arguments to default method ( |
BIOM (Biological Observation Matrix) is a simple prescription for storing an annotated table of data. It may be described as a format, standard, or data structure.
The JSON (JavaScript Object Notation) standard for expressing general data objects as text is employed to define BIOM. Therefore the native form of BIOM data is structured text, conforming to the JSON specification in general and the BIOM specification in particular. Familiarity with BIOM is assumed here.
The S3 class biom
and its methods facilitate analyses
by expressing BIOM data as objects in the R environment.
The functions above apply to an R object that is already of class biom
.
print()
and summary()
show the contents of the object,
with the difference that the latter omits printing the BIOM data table.
The former always prints it in expanded (non-sparse) form.
str()
shows the raw R structure of its argument
using the default str()
with pleasing options.
head()
and tail()
return the data table's
initial or final few rows and columns.
A matrix
for head
() and tail()
. See note below.
For the others, nothing useful.
When the object is "sparse"
its data table is stored as
a three-column sparse representation matrix.
(See reference for details, and note that indices begin at zero.)
Such data is displayed by print()
in an expanded (non-sparse) form,
but head()
and tail()
return
parts of the sparse representation unexpanded.
Daniel T. Braithwaite
## one toy example, one real example: xx <- biom (dmat, quiet=TRUE) yy <- biom (li4) summary (xx) print (xx) head (xx) tail (xx) tail (xx, n=10, p=3) tail (yy) tail (yy, n=15) ## biom class is just a list: str (yy)