Learn R Programming

DataCombine (version 0.1.12)

rmExcept: 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

Examples

Run this code
# 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