rm_except: Remove all files from environment except for the files listed...

Description Usage Arguments Value Examples

Description

This function will clear the environment with the exception of the files listed. Please note that the current version of this function will remove datasets, vectors and functions. The files that should remain in memory can be listed as a vector or as a list.

Usage

1
rm_except(objects, remove_action = TRUE)

Arguments

objects

List or vector of object names that should not be removed. Please note that filenames should be quoted

remove_action

By default, remove_action is TRUE and will remove all files except the ones listed in objects. If FALSE, the function will return a list of all functions that will be removed.

Value

removes files from global environment

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
iris_data <- iris
x <- 1
y <- 2
remove_except("iris_data")
remove_except(c("iris_data", "x")
remove_except(list("iris_data", "x")

## End(Not run)

suzanbaert/eraser documentation built on May 7, 2019, 9:23 p.m.