#' @title Mode
#' @description Calculates the statistical mode
#' @param vec A numeric/integer vector
#' @return The mode of the submitted vector
#' @export
read_mode <- function(vec){
vec %>%
tabyl() %>%
arrange(desc(n)) %>%
pull(1) %>%
pluck(1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.