Calculate the niche overlap between all combinations of taxa as present in the 'taxa' argument, or the combinations of taxa present in the 'taxa' and 'taxa_comp' arguments. Two methods are curently provided: "D" - Schoener's D (Schoener, 1968) "I" - Warren's I (Warren et al., 2008)
Usage
calc_overlap(
taxa,
taxa_comp = NULL,
data = elements::HOAData,
vars = elements::VariableNames,
method = "D",
average = FALSE,
format = "wide"
)Arguments
- taxa
A vector of strings containing taxon codes, see
elements::TaxonomicBackbone.- taxa_comp
A vector of string containing taxon codes, see
elements::TaxonomicBackbone.- data
A data frame containing the univariate responses of the taxa supplied in the 'taxa' and 'taxa_comp' arguments for the variables supplied in the 'vars' argument.
elements::HOADataby default.- vars
A vector of strings containing the variables for which to calculate the overlap, one or more of
elements::VariableNames.- method
A string, one of "D" or "I" indicating the overlap method (see description).
- average
A boolean (TRUE/FALSE) indicating whether to calculate the mean overlap across all variables.
- format
A boolean (TRUE/FALSE) indicating whether to return the results in wide of long format.
References
Schoener, T.W., 1968. The Anolis Lizards of Bimini: Resource Partitioning in a Complex Fauna. Ecology 49, 704–726. https://doi.org/10.2307/1935534 Warren, D.L., Glor, R.E., Turelli, M., 2008. ENVIRONMENTAL NICHE EQUIVALENCY VERSUS CONSERVATISM: QUANTITATIVE APPROACHES TO NICHE EVOLUTION. Evolution 62, 2868–2883. https://doi.org/10.1111/j.1558-5646.2008.00482.x
Examples
elements::calc_overlap(taxa = c("carex_arenaria", "carex_divulsa", "carex_hirta", "carex_sylvatica"))
#> taxon_code_1 taxon_code_2 bio05 bio06 bio16 bio17 GP L M N R S SD
#> 1 carex_arenaria carex_divulsa 0.1712193 0.4645794 0.5491408 0.5950306 0.7176495 0.5878543 0.8115673 0.5197329 0.4670727 0.6067204 0.7036407
#> 2 carex_arenaria carex_hirta 0.4504825 0.5580613 0.8870818 0.6769176 0.7574082 0.8109810 0.5582423 0.7042565 0.5214336 0.5615397 0.7288062
#> 3 carex_arenaria carex_sylvatica 0.6305706 0.4761445 0.5306642 0.5528317 0.7495325 0.4710773 0.4700700 0.6397971 0.4598479 0.4570692 0.7330286
#> 4 carex_divulsa carex_hirta 0.7171230 0.5469514 0.5267771 0.7878075 0.7270656 0.5813232 0.5455349 0.7629162 0.8770224 0.8175112 0.8631793
#> 5 carex_divulsa carex_sylvatica 0.5125660 0.6670865 0.7725601 0.7372212 0.8534908 0.6871001 0.4434238 0.8183531 0.9196262 0.8010941 0.8094193
#> 6 carex_hirta carex_sylvatica 0.7930880 0.8505613 0.5910256 0.8477201 0.7400087 0.4146582 0.8299671 0.9322808 0.9087748 0.8388405 0.7913364