| env_clear | R Documentation |
Cleans up the R environment by removing objects, closing plots, detaching packages, and running garbage collection. Does not clear the console.
env_clear(keep = character(), envir)
keep |
Character vector of object names to keep (default: empty) |
envir |
The environment to clear |
Invisibly returns NULL
if (FALSE) {
# Clean a specific environment
env_clear(envir = my_env)
# Keep specific objects
env_clear(keep = c("config", "data"), envir = my_env)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.