cleanup: cleanup

View source: R/cleanup.R

cleanupR Documentation

cleanup

Description

Function which cleans up the GlobalEnv by removing all objects whose name commences with "t."

Usage

cleanup(pattern = "^t[.]")

Arguments

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.

Examples

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$"))

stpalan/SPTools documentation built on Aug. 21, 2023, 11:21 a.m.