as.matrix.rbiom: Convert an rbiom object to a simple count matrix.

as.matrix.rbiomR Documentation

Convert an rbiom object to a simple count matrix.

Description

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]


rbiom documentation built on April 3, 2025, 6:39 p.m.