rmExcept | R Documentation |
rmExcept
removes all objects from a workspace except those specified
by the user.
rmExcept(keepers, envir = globalenv(), message = TRUE)
keepers |
a character vector of the names of object you would like to keep in your workspace. |
envir |
the |
message |
logical, whether or not to return a message informing the user of which objects were removed. |
# Create objects
A <- 1; B <- 2; C <- 3
# Remove all objects except for A
rmExcept("A")
ls()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.