powered by
rmExcept
rmExcept(keepers, envir = globalenv(), message = TRUE)
environment
globalenv
# Create objects A <- 1; B <- 2; C <- 3 # Remove all objects except for A rmExcept("A") # Show workspace ls()
Run the code above in your browser using DataLab