rmExcept {DataCombine}R Documentation

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

Description

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

Usage

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

# Create objects
A <- 1; B <- 2; C <- 3

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

# Show workspace
ls()


[Package DataCombine version 0.2.21 Index]