Calculate the percentage of each sample represented by the specified taxon or taxa.

taxa_tol_index(
  .dataframe,
  .key_col,
  .counts_col,
  .filter = NULL,
  .unnest_col = NULL,
  .tol_col,
  na.rm = TRUE
)

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 unqouted column name that represents nested data. If this column is NULL (default), then the data will not be unnested.

.tol_col

One unqouted column name that represents numeric tolerance values.

na.rm

A logical value indicating if taxa with missing tolerance values (.tol_val = NA) should be removed prior to calculating the tolerance index. The default is TRUE, NA values should will be removed, becuase missing values will be effectively treated as zeros during calculations; this will incorrectly skew the final value to the lower range of the index spectrum.

Value

A numeric vector.