% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utility.R
\name{entropy}
\alias{entropy}
\title{Entropy of a distribution}
\usage{
entropy(p, base = 2)
}
\arguments{
\item{p}{Discrete probability distribution}

\item{base}{Desired base for entropy, eg, 2 for bits}
}
\value{
Calculated Shannon entropy
}
\description{
Entropy of a distribution
}
\examples{
entropy(c(0.5, 0.5))
entropy(c(0.9, 0.1))
}
