Convert two-dimensional data between ordinary (dense) matrix type, sparse representation, and a list of rows (or columns).
1 2 3
object to convert (
number of rows and columns (length-two
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 codebiom and its methods facilitate analyses by expressing BIOM data as objects in the R environment. These manipulations of two-dimensional (matrix) data are sometimes handy when working with BIOM data. The sparse format used by BIOM is conventional, but see the reference for exact details.
dimnames() are removed.
dense2sparse() return a
matrix2list() returns a list of the rows of
Like R these functions begin indices at 1, whereas BIOM counts from 0, so adjust if necessary.
Daniel T. Braithwaite
1 2 3 4 5 6 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.