#' Removes global R objects if they exist in the global environment
#' @export
rm_global_robjs_if_exist <-
function(robj_names) {
garbage_can <- robj_names
for (i in 1:length(garbage_can)) {
if (exists(garbage_can[i], envir = globalenv())) {
rm(list = garbage_can[i], envir = globalenv())
}
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.