entropy: Compute Shannon Entropy

View source: R/utilities.R

entropyR Documentation

Compute Shannon Entropy

Description

This function calculates the Shannon entropy of a numeric vector.

Usage

entropy(x)

Arguments

x

A numeric vector containing the values for which entropy will be computed.

Value

A numeric value representing the entropy.

Examples

library(pliman)
x <- c(1, 2, 2, 3, 3, 3, 4, 4, 4, 4)
entropy(x)

pliman documentation built on Aug. 21, 2025, 5:46 p.m.

Related to entropy in pliman...