View source: R/get_taxa_abundance.R
get_taxa_abundance | R Documentation |
Calculates the absolute or relative abundance of a taxon or of a set taxa.
get_taxa_abundance(x, taxa = NULL, rel = FALSE)
x |
Result of |
taxa |
A taxon or a vector of taxa. |
rel |
If |
This function does not check for parent-child pairs. For instance if the vector of taxa contains both the genus Baetis and the
family Baetidae, the abundance of the genus Baetis will be double counted. Check the function solve_ambiguous()
for a solution
to this problem.
aggregate_taxa solve_ambiguous get_taxa_richness
data(macro_ex)
data_bio <- as_biomonitor(macro_ex)
data_agr <- aggregate_taxa(data_bio)
get_taxa_abundance(data_agr, taxa = "Ephemeroptera")
get_taxa_abundance(data_agr, taxa = c("Setodes", "Orthocladiinae"), rel = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.