csi: Community trait specialization

View source: R/csi.R

csiR Documentation

Community trait specialization

Description

\Sexpr[results=rd, stage=render]{ lifecycle::badge("maturing") }

This function calculates the community trait specialization.

Usage

csi(x, trait_db = NULL, tax_lev = "Taxa", trans = log1p, traceB = FALSE)

tsi(x, trait_db = NULL, tax_lev = "Taxa")

Arguments

x

Result of aggregate_taxa().

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.

tax_lev

Character string giving the taxonomic level used to retrieve trait information. Possible levels are "Taxa", "Species", "Genus", "Family" as returned by aggregate_taxa().

trans

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

traceB

When set to TRUE returns a list with the results of the csi() function and the traits value used for the calculation.

Details

This function first takes the abundance table corresponding to the desired taxonomic level in x.

For each taxon and each trait, a taxon specialization index is calculated using the following formula:

TSI = (sum(c^{2}_tik) - 1/K) / (1 - 1/K)

with c^{2}_tik being the affinity of taxon t for the modality k (among K) of trait i.

Finally, the community trait specialization is calculated for each trait by averaging the TSIs using the transformed abundances (using the trans function) as weigths. Only taxa having traits contributes to the calculation of index.

Value

a data.frame with the CSI values for each trait

Functions

  • tsi(): taxon specialization index

References

Mondy, C. P., & Usseglio-Polatera P. (2013) Using Fuzzy-Coded Traits to Elucidate the Non-Random Role of Anthropogenic Stress in the Functional Homogenisation of Invertebrate Assemblages. Freshwater Biology, 59 (3), 584-600. https://doi.org/10.1111/fwb.12289.

Tachet, H., Richoux, P., Bournaud, M., & Usseglio-Polatera, P. (2010). Invertebres d'eau douce: systematique, biologie, ecologie. Paris: CNRS editions.

Schmidt-Kloiber, A., & Hering, D. (2015). www. freshwaterecology. info-An online tool that unifies, standardises and codifies more than 20,000 European freshwater organisms and their ecological preferences. Ecological indicators, 53, 271-282.

See Also

aggregate_taxa

Examples

data(macro_ex)

data_bio <- as_biomonitor(macro_ex)
data_agr <- aggregate_taxa(data_bio)
data_ts <- assign_traits(data_agr)

# averaging
data_ts_av <- average_traits(data_ts)

# taxon specialization index

tsi(x = data_agr, trait_db = data_ts_av, tax_lev = "Taxa")

# community specialization index
csi(x = data_agr, trait_db = data_ts_av, tax_lev = "Taxa", trans = log1p)
csi(
  x = data_agr, trait_db = data_ts_av, tax_lev = "Taxa",
  trans = function(x) {
    ifelse(x > 0, 1, 0)
  }
)
csi(x = data_agr, trait_db = data_ts_av, tax_lev = "Genus", trans = log1p)

alexology/biomonitoR documentation built on Oct. 10, 2024, 12:02 a.m.