#' @export
col_exists <-
function(data, col) {
x <-
tryCatch(
expr =
data %>%
dplyr::select({{ col }}),
error = function(e) NULL
)
if (is.null(x)) {
FALSE
} else {
TRUE
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.