Skip to contents

Identical to running as.matrix(biom$counts).

Usage

# S3 method for class 'rbiom'
as.matrix(x, ...)

Arguments

x

An rbiom object, such as from as_rbiom().

...

Not used.

Value

A base R matrix with OTUs as rows and samples as columns.

See also

Other conversion: as.list.rbiom()

Examples

    library(rbiom)
    
    as.matrix(hmp50)[1:5,1:5]
#>          HMP01 HMP02 HMP03 HMP04 HMP05
#> Unc01yki     0     0     0     0     0
#> Unc53100  1083   543   301   223  2672
#> LtbAci52     0     0     0     0     0
#> CnbTube3     0     0     0     0     0
#> Unc02qsf     0     0     0     0     0