richness: Richness Index

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/richness.R

Description

Community richness index.

Usage

1
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

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

microbiome documentation built on Nov. 8, 2020, 5:08 p.m.