zero_entropy_variables: Identify variables with zero entropy

View source: R/QC_info_theory.R

zero_entropy_variablesR 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)

eHDPrep documentation built on June 7, 2023, 6:09 p.m.