#' mode
#'
#' @param x vector to get mode of
#'
#' @return the mode
#' @export
#'
mode <- function(x) {
ux <- unique(x)[!is.na(unique(x))]
r <- ux[which.max(tabulate(match(x, ux)))]
return(r)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.