shannonEntropy {SCCI} | R Documentation |
Shannon Entropy
Description
Calculates the Shannon entropy over data of a discrete random variable .
Usage
shannonEntropy(x)
Arguments
x |
A discrete vector. |
Examples
set.seed(1)
x = round((runif(1000, min=0, max=5)))
shannonEntropy(x=x) ## 2.522265
[Package SCCI version 1.2 Index]