Clear: Clear Memory of All Objects

Description Usage Arguments Author(s) Examples

Description

This function is a wrapper for the command rm(list=ls()).

Usage

1
Clear(what = NULL, keep = TRUE)

Arguments

what

The object (as a string) that needs to be removed (or kept)

keep

Should obj be kept (i.e., everything but obj removed)? Or dropped?

Author(s)

Daniel Marcelino, dmarcelino@live.com.

Examples

1
2
3
4
5
6
7
8
# create objects
a=1; b=2; c=3; d=4; e=5
# remove d
Clear("d", keep=FALSE)
ls()
# remove all but a and b
Clear(c("a", "b"), keep=TRUE)
ls()

SciencesPo documentation built on May 29, 2017, 9:28 p.m.