richness {microbiome} | R 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)

[Package microbiome version 1.12.0 Index]