# Raise an error if a required package is not installed
stop_without_package <- function(package) {
if (!requireNamespace(package, quietly = TRUE)) {
stop(sprintf("This function requires the '%s' package", package),
call. = FALSE)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.