stat.entropyFunction(c(1,0,0,0,1,0,0,0,0,0,0,0,0)) # Output: 0.6193822
stat.entropyFunction(c(1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0)) # Output: 1
stat.entropyFunction(c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)) # Output: 0
Run the code above in your browser using DataLab