entropy {dlookr}R 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)


[Package dlookr version 0.6.3 Index]