6 Metrics
Metrics: a measure of a specific aspect of a biological community.
6.1 Metric Function List
All of the metric functions in mmir begin with the prefix taxa_
. This prefix makes it easier to call these functions because RStudio will provide a list of functions that begin with the same prefix, in this case taxa_
.
taxa_rich()
calculates taxonomic richness.taxa_pct_rich()
calculates relative taxonomic richness.taxa_div()
calculates taxonomic diversity indices.shannon
Shannon-Wiener Diversitysimpson
Simpson’s Diversitymargalef
Margalef’s Diversitymenhinick
Menhinick’s Diversitypielou
Pielou Evenness
taxa_abund()
calculates taxonomic abundance.taxa_pct()
calculates relative taxonomic abundance.taxa_dom()
calculates relative taxonomic dominance.taxa_tol_index()
calculates taxonomic tolerance indices.
6.2 Metric Function Arguments
.dataframe
= A data frame where each row should represent the number of individuals enumerated for a single taxon collected during a single sampling event..key_col
= One unquoted column name that represents a key (i.e., unique ID) for a sampling event for which to group (i.e., aggregate) the data..counts_col
= One unquoted column name that represents taxonomic counts..filter
= A logical statement to subset the data frame prior to calculating the metric of interest..unnest_col
= One unquoted column name that represents nested data. If this column is NULL (default), then the data will not be unnested..group_col
= One unquoted column name that represents a taxonomic rank or group of interest.
6.3 Metric Function Output
The output of each of these functions will be a vector.
Vector Example: 10, 1, 13, 15, 2, 6, 7