richness: Richness Index

View source: R/richness.R

richnessR Documentation

Richness Index

Description

Community richness index.

Usage

richness(x, index = c("observed", "chao1"), detection = 0)

Arguments

x

A species abundance vector, or matrix (taxa/features x samples) with the absolute count data (no relative abundances), or phyloseq-class object

index

"observed" or "chao1"

detection

Detection threshold. Used for the "observed" index.

Details

By default, returns the richness for multiple detection thresholds defined by the data quantiles. If the detection argument is provided, returns richness with that detection threshold. The "observed" richness corresponds to index="observed", detection=0.

Value

A vector of richness indices

Author(s)

Contact: Leo Lahti microbiome-admin@googlegroups.com

See Also

alpha

Examples

data(dietswap)
d <- richness(dietswap, detection=0)

microbiome/microbiome documentation built on Aug. 22, 2023, 7:12 a.m.