#' @importFrom rlang abort
check_aes <- function(aes, data_names) {
not_in_names <- !(aes %in% data_names)
if (any(not_in_names)) {
abort(paste(
"The following aesthetics are not present in data: ",
paste(aes[not_in_names], collapse = ", ")
))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.