clear: Clear objects from the global environment

Description Usage Arguments Value Examples

Description

This function removes specific (or all by default) named objects from the global environment. If used within a ProjectTemplate2 project, then any variables defined in the config$sticky_variables will remain.

Usage

1
clear(..., keep = c(), force = FALSE)

Arguments

...

A sequence of character strings of the objects to be removed from the global environment. If none given, then all items except those in keep will be deleted. This includes items beginning with .

keep

A character vector of variables that should remain in the global environment

force

If TRUE, then variables will be deleted even if specifed in keep or config$sticky_variables

Value

The variables kept and removed are reported

Examples

1
2
3
4
5
6
7
library('ProjectTemplate2')
## Not run: 
clear("x", "y", "z")
clear(keep="a")
clear()

## End(Not run)

connectedblue/ProjectTemplate2 documentation built on May 17, 2019, 2:46 p.m.