powered by
Calculates observed richness on a single column of relative abundance data.
obs_richness(sample)
A vector of relative abundance data, typically a single column in a matrix
Returns a single number indicating the number of taxa in the tested sample
# NOT RUN { data(otu_table) richness <- apply(otu_table, 2, obs_richness) # }
Run the code above in your browser using DataLab