shannon.entropy: Shannon entropy

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/tools.R

Description

Calculates the Shannon entropy for a probability distribution

Usage

1

Arguments

p

A vector of probabilities (must sum to ~1)

Details

None

Value

Returns a numeric value for the Shannon entropy of the supplied probability distribution

Note

None

Author(s)

Loyal A. Goff

References

None

Examples

1
2
3
	x<-sample(1:500,50)
	p<-x/sum(x)
	shannon.entropy(p)

shiauck/cummeRbund_on_RSQLite2.0 documentation built on May 5, 2019, 12:33 p.m.