#' Normalises a distribution from 0 to 1 given the relative frequencies
#' of each of the events
#' @param distribution A vector of relative frequencies
#' @return A vector with the probability distribution of each of the outcomes
#' @export
normalise_distribution <- function(distribution)
{
return(distribution/sum(distribution))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.