get_diversity_from_distribution {triversity} | R Documentation |
Compute the diversity of a probability distribution.
Description
get_diversity_from_distribution
computes diversity values associated to an input
probability distribution
. The implemented diversity measures all belong to the
parametrized family of "True Diversity" measures. They can either be specified by their
diversity order
in [0
,Inf
[ or by their measure
name when it
corresponds to classical instances such as the richness, the Shannon entropy, the
Herfindahl-Hirschman index, or the Berger-Parker index.
Usage
get_diversity_from_distribution(distribution, order = NULL, measure = NULL)
Arguments
distribution |
A vector of floats in [ |
order |
A vector of positive floats (possibly including |
measure |
A vector of strings giving the names of the diversity measures to compute.
Possible values are |
Value
A vector of positive floats giving the diversity values of the input probability distribution.
Examples
distribution <- c (1/4, 1/2, 1/12, 2/12)
get_diversity_from_distribution (distribution)
get_diversity_from_distribution (distribution, order=c(0,Inf), measure='entropy')