#' Converts strings to a tidy format
#'
#' @param x Input string
#'
#' @author Shona Wilde
#'
#' @return Cleaned string
#'
#' @export
str_tidy <- function(x) {
x_clean <- x %>%
str_to_lower() %>%
str_replace_all("-", "_") %>%
str_replace_all(" ", "_") %>%
str_replace_all(",", "_")
return(x_clean)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.