remove_except <- function(exceptions){
files <- ls(globalenv())
files <- files[!files %in% exceptions]
rm(files, pos = globalenv())
return(invisible())
}
subset_except <- function(df, exceptions){
names <- colnames(df)
to_keep <- names[!names %in% exceptions]
if("data.table" %in% class(df)){
} else {
}
return(df)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.