entropy: Calculate entropy of discrete distribution

View source: R/entropy.R

entropyR Documentation

Calculate entropy of discrete distribution

Description

Calculate entropy of discrete distribution

Usage

entropy(p, ...)

## Default S3 method:
entropy(p, ...)

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

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

Arguments

p

non-negative numeric vector

...

other arguments to methods

margin

margin to consider

Value

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

Methods (by class)

  • default: Default method for vectors

  • array: Method for arrays

  • tables: Method for tables object


contingency documentation built on Nov. 18, 2022, 5:08 p.m.