fuzzy_trait_ratio: Indices from fuzzy coded data

View source: R/fuzzy_trait_ratio.R

fuzzy_trait_ratioR Documentation

Indices from fuzzy coded data

Description

This function calculates indices starting from fuzzy coded data.

Usage

fuzzy_trait_ratio(
  x,
  tax_lev = "Taxa",
  trait_db = NULL,
  type = "ab",
  numerator = NULL,
  denominator = NULL,
  trans = NULL
)

Arguments

x

Result of aggregate_taxa().

tax_lev

Taxonomic level at which the calculation has to be performed.

trait_db

A trait data.frame with a column Taxa and the other columns containing the traits. Please check assign_traits() for building the trait dataset.

type

Presence only po or abundance ab.

numerator

Names of the columns to set as the numerator.

denominator

Names of the columns to set as the denominator.

trans

The function used to transform the abundances, by default log1p.

Details

This function best performs with standardized fuzzy coded data that sum up to 1 for each taxon. For each taxon, it works by i) summing the scores at the numerator, ii) summing the scores at the denominator, iii) multiplying these sums for the abundance of the target taxon. This step is performed for all the taxa in a community. The last step consists in summing up the scores of all the taxa for both the numerator and denominator and in taking the ratio between the numerator and the denominator. An example of this approach is the Flow_T index developed by Laini et al. (2022).

References

Laini, A., Burgazzi, G., Chadd, R., England, J., Tziortzis, I., Ventrucci, M., Vezza, P., Viaroli, P., Wood, P.J. & Guareschi, S. (2022). Using invertebrate functional traits to improve flow variability assessment within European rivers. Science of The Total Environment, 832, 155047.

See Also

as_biomonitor assign_traits

Examples


data(mi_prin)
data_bio <- as_biomonitor(mi_prin)
data_agr <- aggregate_taxa(data_bio)
data_ts <- assign_traits(data_agr)


# averaging
data_ts_av <- average_traits(data_ts)

numerator <- c("CURRENT_3", "CURRENT_4")
denominator <- c("CURRENT_1", "CURRENT_2", "CURRENT_3", "CURRENT_4")
fuzzy_trait_ratio(data_agr, tax_lev = "Taxa", trait_db = data_ts_av,
   type = "ab", numerator = numerator, denominator = denominator, trans = log1p)

alexology/biomonitoR documentation built on April 7, 2024, 10:15 a.m.