View source: R/diversity-based.R
calc_diversity | R Documentation |
Calculate diversity values from a taxa table.
calc_diversity(tax_table, metric)
tax_table |
The taxa table. |
metric |
The diversity metric to calculate. Acceptable values are: 'richness', 'shannon', and 'simpson'. |
Richness is the number of unique species per sample. Simpson's diversity metric (1 - D) quantifies evenness, and Shannon diversity is a combination of richness and evenness.
A numeric vector providing the specificed diversity metric for each sample.
calc_diversity(fruits_veggies$data_loaded, "shannon")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.