get_diversity_from_distribution: Compute the diversity of a probability distribution.

Description Usage Arguments Value Examples

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

1

Arguments

distribution

A vector of floats in [0,1] and summing to 1 giving the probability distribution whose diversity is measured.

order

A vector of positive floats (possibly including Inf) giving the orders of the diversity measures to be computed. If neither order nor measure is specified, a predefined list of 8 diversity measures is computed.

measure

A vector of strings giving the names of the diversity measures to compute. Possible values are richness, entropy, herfindahl, and bergerparker.

Value

A vector of positive floats giving the diversity values of the input probability distribution.

Examples

1
2
3
4
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')

Lamarche-Perrin/triversity documentation built on May 22, 2019, 12:36 p.m.