#' Cumulative relative frequency
#' @export
cumprop <- function(x, decreasing = TRUE)
{
#if (is.unsorted(x)) x <- sort(x, decreasing = decreasing)
x <- sort(x, decreasing = decreasing)
result <- cumsum(x)/sum(x)
return(result)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.