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)

gofflab/cummeRbund-BioC-Bridge documentation built on May 17, 2019, 7:30 a.m.