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_.

  1. taxa_rich()calculates taxonomic richness.
  2. taxa_pct_rich() calculates relative taxonomic richness.
  3. taxa_div() calculates taxonomic diversity indices.
    • shannon Shannon-Wiener Diversity
    • simpson Simpson’s Diversity
    • margalef Margalef’s Diversity
    • menhinick Menhinick’s Diversity
    • pielou Pielou Evenness
  4. taxa_abund() calculates taxonomic abundance.
  5. taxa_pct() calculates relative taxonomic abundance.
  6. taxa_dom() calculates relative taxonomic dominance.
  7. 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