.pkg_check <- function(package) {
if (!requireNamespace(package, quietly = TRUE)) {
stop("Please install package ", package, " to use this function.")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.