Add community dissimilarity data to a phylospatial
object
ps_add_dissim.Rd
This function calculates pairwise phylogenetic dissimilarity between communities and returns the phylospatial
object with the dissimilarity data added as an element called dissim
. See ps_dissim for details.
Examples
ps <- ps_simulate(data_type = "prob")
ps_add_dissim(ps)
#> `phylospatial` object
#> - 18 lineages across 400 sites
#> - community data type: probability
#> - spatial data class: SpatRaster
#> - dissimilarity data: sorensen
ps_add_dissim(ps, fun = "vegdist", method = "jaccard", endemism = TRUE)
#> `phylospatial` object
#> - 18 lineages across 400 sites
#> - community data type: probability
#> - spatial data class: SpatRaster
#> - dissimilarity data: jaccard