entropy: Calculate the entropy

View source: R/utils.R

entropyR Documentation

Calculate the entropy

Description

Calculate the Shannon's entropy.

Usage

entropy(x)

Arguments

x

a numeric vector.

Value

numeric. entropy

Examples

set.seed(123)
x <- sample(1:10, 20, replace = TRUE)

entropy(x)


dlookr documentation built on July 9, 2023, 6:31 p.m.