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 May 29, 2024, 2 a.m.