cleanup | R Documentation |
Function which cleans up the GlobalEnv by removing all objects whose name commences with "t."
cleanup(pattern = "^t[.]")
pattern |
A character vector containing the RegEx patterns of the object names to remove. Make sure to surround names by "^...$" if you want to match the name exactly. |
Instead of writing:
rm(list=ls(pattern="^t[.]"))
one can write
cleanup()
You can also expressly specify objects to clean up:
cleanup(c("^temp_var$","^x$"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.