get_mode <- function(x) {
table(x) %>%
which.max() %>%
names()
}
count_mode <- function(x) {
table(x) %>%
max()
}
pct_mode <- function(x) {
(table(x) / length(x)) %>%
max() %>%
round(., 3)
}
count_non_alphanum <- function(x) {
stringr::str_detect(x, "[^[:alnum:]]") %>%
sum()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.