View source: R/fuzzy_trait_ratio.R
fuzzy_trait_ratio | R Documentation |
This function calculates indices starting from fuzzy coded data.
fuzzy_trait_ratio(
x,
tax_lev = "Taxa",
trait_db = NULL,
type = "ab",
numerator = NULL,
denominator = NULL,
trans = NULL
)
x |
Result of |
tax_lev |
Taxonomic level at which the calculation has to be performed. |
trait_db |
A trait |
type |
Presence only |
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 |
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).
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.
as_biomonitor assign_traits
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.