Learn R Programming

OTUtable (version 1.1.2)

chao1: Chao1 Richness

Description

Calculates Chao1 richness of a vector of relative abundance data. This alpha diversity metric takes into account the number of singletons and doubletons for a more accurate estimate than observed richness.

Usage

chao1(sample)

Arguments

sample

A vector of relative abundance data, typically a column in a matrix

Value

Returns a single number indicating the estimated richness in the tested sample based on the number of taxa appearing only once or twice

Examples

Run this code
# NOT RUN {
data(otu_table)
chao1_richness <- apply(otu_table, 2, chao1)
# }

Run the code above in your browser using DataLab