#' porc Function
#'
#' Typical count + mutate pipeline to get percentage values
#' @keywords porc
#' @export
porc <- function(df, var){
var <- enquo(var)
df %>%
count(!!var) %>%
mutate(porc = round(n*100/sum(n),1)) %>%
arrange(-porc)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.