shannon.entropy {cummeRbund} | R Documentation |
Calculates the Shannon entropy for a probability distribution
shannon.entropy(p)
p |
A vector of probabilities (must sum to ~1) |
None
Returns a numeric value for the Shannon entropy of the supplied probability distribution
None
Loyal A. Goff
None
x<-sample(1:500,50) p<-x/sum(x) shannon.entropy(p)