diversity: Entropy Based Measures of Data Diversity

Description Usage Arguments Value Examples

View source: R/diversity.R

Description

Calculate the diversity of a dataset or vector by determining the degree to which differentiable groups vary from maximum entropy for the number of unique grouping. If the groupings are uniformly distributed, the entropy is maximized. This functions calculates the ratio of the entropy for the real distribution of groupings to the maximum entropy distribution to determine the overall diversity represented in the data.

Usage

1

Arguments

data

a vector, data frame, or tibble type object

...

arguments passed to 'entropy' function

Value

a named vector containing the percentage diversity, the true entropy of the dataset, and the potential entropy of the dataset ( diversity, entropy, potential_entropy )

Examples

1
2
3
4
5
6
diversity(cars)

t <- data.frame(a = rep(0, 100))
v <- runif(100)
diversity(t)
diversity(v)

duncankmckinnon/diversity documentation built on Aug. 17, 2020, 12:24 a.m.