#' Generate relevant indefinite given string
#'
#' @param str A string
#'
#' @return A string
#' @export
#'
get_indefinite <- function(str) {
if (str %>% stringr::str_detect("^[aeiou]")) {
out <- "an"
} else {
out <- "a"
}
return(out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.