Learn R Programming

setweaver (version 1.0.0)

entropy: entropy

Description

Returns marginal entropy for binary variables

Usage

entropy(x)

Value

A numeric scalar giving the entropy of `x`.

Arguments

x

A binary vector (numeric coded as 0/1 or logical). Must be length >= 1.

Examples

Run this code
entropy(misimdata$x1)

Run the code above in your browser using DataLab