Learn R Programming

contingency (version 0.0.10)

entropy: Calculate entropy of discrete distribution

Description

Calculate entropy of discrete distribution

Usage

entropy(p, ...)

# S3 method for default entropy(p, ...)

# S3 method for array entropy(p, margin, ...)

# S3 method for tables entropy(p, margin, ...)

Value

A numeric value of the entopy, or vector of entropies.

Arguments

p

non-negative numeric vector

...

other arguments to methods

margin

margin to consider

Methods (by class)

  • default: Default method for vectors

  • array: Method for arrays

  • tables: Method for tables object