#' Entropy #' #' @param cat.vect #' #' @return #' @export #' #' @examples entropy = function(cat.vect,useNA){ px = table(cat.vect,useNA=useNA)/NROW(cat.vect) lpx = log(px, base=exp(1)) ent = -sum(px*lpx) return(ent) }
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.