unique row and column
and row and column
of an object of class
1 2 3 4 5 6 7 8 9
an object (
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 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
dim() returns the dimensions of the BIOM data table (its
dimnames() returns the unique row and column
ids required by BIOM.
metadata() returns the row and column
provided for by BIOM. They may be empty.
dim(), a length-two
with additional attribute
"nnz" (number not zero)
if the object is
equaling the number of values (rows) in the sparse representation.
See note below.
list of two
list (invisibly) of two components,
Each is a
list equal in length to the data table's corresponding dimension.
the dimensions of
as.matrix(x) are not given by
Rather, the latter has dimensions
c("nnz", 3). See above.
Also note that BIOM requires no exact structure for the metadata annotations of each row (column). All that is guaranteed is a list (possibly of empty, atomic, or nested list elements) with as many entries as the data table has rows (columns).
Daniel T. Braithwaite
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
## one toy example, one real example: dd <- biom (dmat, quiet=TRUE) ff <- biom (li4, quiet=TRUE) dim (dd) dim (ff) dim (as.matrix (ff)) dim (as.matrix (ff, expand=TRUE)) dimnames (dd) dimnames (ff) ## automatic row and column ids: dimnames (biom (smat, sparse=TRUE, quiet=TRUE)) ## no metadata: print (metadata (dd)) ## simple metadata: ss <- biom (li3) print (as.matrix (ss)) metadata (ss) $ columns ## complicated metadata, so look only at part: head (metadata(ff) $ rows) str (metadata(ff) $ columns [])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.