entropy {contingency} | R Documentation |
Calculate entropy of discrete distribution
entropy(p, ...)
## Default S3 method:
entropy(p, ...)
## S3 method for class 'array'
entropy(p, margin, ...)
## S3 method for class 'tables'
entropy(p, margin, ...)
p |
non-negative numeric vector |
... |
other arguments to methods |
margin |
margin to consider |
A numeric value of the entopy, or vector of entropies.
default
: Default method for vectors
array
: Method for arrays
tables
: Method for tables
object