Nothing
#'@title Calculates the entropy
#'@name entropy
#'
#'@description A function that calculates the entropy
#'
#'@param x The probabilities P0 and P1
#'
#'@return Returns the entropy
#'@author Murilo Montanini Breve
entropy <- function(x){
entrop <- 0
if (x > 0)
entrop <- (-(x * log2(x)))
if (is.nan(x) == TRUE)
entrop <- 0
return(entrop)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.