View source: R/fun_similarity.R
fun_similarity | R Documentation |
Transform a distance matrix into a similarity matrix \insertCiteLeinster2012divent. Similarity between two species is defined either by a negative exponential function of their distance or by the complement to 1 of their normalized distance (such that the most distant species are 1 apart).
fun_similarity(distances, exponential = TRUE, rate = 1, check_arguments = TRUE)
distances |
a distance matrix or an object of class stats::dist. |
exponential |
If |
rate |
the decay rate of the exponential similarity. |
check_arguments |
if |
A similarity matrix.
# Similarity between Paracou 6 species
hist(fun_similarity(paracou_6_fundist))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.