adiv_matrix {rbiom} | R Documentation |
Create a matrix of samples x alpha diversity metrics.
Description
Create a matrix of samples x alpha diversity metrics.
Usage
adiv_matrix(biom, adiv = ".all", transform = "none", cpus = NULL)
Arguments
biom |
An rbiom object, such as from |
adiv |
Alpha diversity metric(s) to use. Options are: |
transform |
Transformation to apply. Options are:
|
cpus |
The number of CPUs to use. Set to |
Value
A numeric matrix with samples as rows. The first column is
Depth. Remaining columns are the alpha diversity metric names
given by adiv
: one or more of OTUs, Shannon,
Chao1, Simpson, and InvSimpson.
Examples
library(rbiom)
biom <- slice_head(hmp50, n = 5)
adiv_matrix(biom)