View source: R/fun_ordinariness.R
fun_ordinariness | R Documentation |
The ordinariness of a species is the average similarity of its individuals with others \insertCiteLeinster2012divent.
fun_ordinariness(
species_distribution,
similarities = diag(sum(!colnames(species_distribution) %in% non_species_columns)),
as_numeric = FALSE,
check_arguments = TRUE
)
species_distribution |
an object of class species_distribution. |
similarities |
a similarity matrix, that can be obtained by fun_similarity. Its default value is the identity matrix. |
as_numeric |
if |
check_arguments |
if |
All species of the species_distribution
must be found in the matrix of
similarities
if it is named.
If it is not, its size must equal the number of species.
Then, the order of species is assumed to be the same as that of the
species_distribution
.
A tibble with the ordinariness of each species, or a matrix if
argument as_numeric
is TRUE
.
fun_ordinariness(paracou_6_abd, fun_similarity(paracou_6_fundist))
# Compare with probabilities
probabilities(paracou_6_abd)
# Decrease similarities so that ordinariness is close to probability
fun_ordinariness(paracou_6_abd, fun_similarity(paracou_6_fundist, rate = 100))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.