View source: R/stat.entropyFunction.r
stat.entropyFunction | R Documentation |
The entropy of a bitstring (ex: 1010111000) is calculated.
stat.entropyFunction(bitString)
bitString |
- A vector of 0's and 1's. |
e - a floating point percentage, between 0 and 1.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.