rmExcept: Remove all objects from a workspace except those specified by...

Description Usage Arguments Examples

Description

rmExcept removes all objects from a workspace except those specified by the user.

Usage

1
rmExcept(keepers, envir = globalenv(), message = TRUE)

Arguments

keepers

a character vector of the names of object you would like to keep in your workspace.

envir

the environment to remove objects from. The default is the global environment (i.e. globalenv).

message

logical, whether or not to return a message informing the user of which objects were removed.

Examples

1
2
3
4
5
6
7
8
# Create objects
A <- 1; B <- 2; C <- 3

# Remove all objects except for A
rmExcept("A")

# Show workspace
ls()

DataCombine documentation built on May 2, 2019, 11:26 a.m.