zero_entropy_variables {eHDPrep}R Documentation

Identify variables with zero entropy

Description

Calculates Shannon entropy of variables in a data frame in bits (default) or natural units. Missing values are omitted from the calculation. Names of variables with zero entropy are returned.

Usage

zero_entropy_variables(data, unit = "bits")

Arguments

data

Data Frame to compute on

unit

Unit to measure entropy. Either "bits" (default) or "nats".

Value

Character vector of variable names with zero entropy

References

Shannon, C. E. A mathematical theory of communication. The Bell System Technical Journal 27, 379–423 (1948).

Examples

data(example_data)
zero_entropy_variables(example_data)

[Package eHDPrep version 1.3.3 Index]