entropyFunction: Entropy of a bit-string

Description Usage Arguments Examples

View source: R/entropyFunction.r

Description

The entropy of a bitstring (ex: 1010111000) is calculated.

Usage

1
entropyFunction(bitString)

Arguments

x

- A vector of 0's and 1's.

Examples

1
2
3
4
5
6
entropyFunction(c(1,0,0,0,1,0,0,0,0,0,0,0,0))
> 0.6193822
entropyFunction(c(1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0))
> 1
entropyFunction(c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1))
> 0

lashmore/MolEndoMatch documentation built on May 5, 2019, 8:02 p.m.