Learn R Programming

rbiom (version 2.2.0)

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

Description

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

Usage

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

Value

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

Arguments

x

An rbiom object, such as from as_rbiom().

...

Not used.

See Also

Other conversion: as.list.rbiom()

Examples

Run this code
    library(rbiom)
    
    as.matrix(hmp50)[1:5,1:5]

Run the code above in your browser using DataLab