obs_richness {OTUtable} | R Documentation |
Observed Richness
Description
Calculates observed richness on a single column of relative abundance data.
Usage
obs_richness(sample)
Arguments
sample |
A vector of relative abundance data, typically a single column in a matrix |
Value
Returns a single number indicating the number of taxa in the tested sample
Note
Use apply functions to calculate richness for all samples in a matrix
Author(s)
Alexandra Linz <amlinz16@gmail.com>
Examples
data(otu_table)
richness <- apply(otu_table, 2, obs_richness)
[Package OTUtable version 1.1.2 Index]