Learn R Programming

divent (version 0.5-3)

fun_ordinariness: Functional ordinariness of a community

Description

The ordinariness of a species is the average similarity of its individuals with others Leinster2012divent.

Usage

fun_ordinariness(
  species_distribution,
  similarities = diag(sum(!colnames(species_distribution) %in% non_species_columns)),
  as_numeric = FALSE,
  check_arguments = TRUE
)

Value

A tibble with the ordinariness of each species, or a matrix if argument as_numeric is TRUE.

Arguments

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 TRUE, a number or a numeric vector is returned rather than a tibble.

check_arguments

if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.

Details

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.

References

Examples

Run this code
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))

Run the code above in your browser using DataLab