adiv_matrix: Create a matrix of samples x alpha diversity metrics.

adiv_matrixR Documentation

Create a matrix of samples x alpha diversity metrics.

Description

Create a matrix of samples x alpha diversity metrics.

Usage

adiv_matrix(biom, trans = "none")

Arguments

biom

An rbiom object, such as from as_rbiom(). Any value accepted by as_rbiom() can also be given here.

trans

Transformation to apply. Options are: c("none", "rank", "log", "log1p", "sqrt"). "rank" is useful for correcting for non-normally distributions before applying regression statistics. Default: "none"

Value

A numeric matrix with samples as rows and columns named Depth, OTUs, Shannon, Chao1, Simpson, and InvSimpson.

Examples

    library(rbiom)
    
    biom <- slice_head(hmp50, n = 5)
    
    adiv_matrix(biom)

cmmr/rbiom documentation built on April 28, 2024, 6:38 a.m.