entropy: Computes Shannon and Weaver's entropy

View source: R/entropy.R

entropyR Documentation

Computes Shannon and Weaver's entropy

Description

Computes standard and normalized entropy based on Shannon and Weavers' mathematical theory of communication (1948).

Usage

entropy(x = NULL, normalize = FALSE)

Arguments

x

A vector for entropy computation

normalize

Default is FALSE. Set TRUE to get normalized entropy.

Value

entropy value

Examples

entropy(x = c(0,0,1,1))
entropy(x = c(0,0,0,0))

dominikjung42/dstools documentation built on June 16, 2024, 2:40 a.m.