keep {gdata} | R Documentation |
Remove all objects from the default workspace, except those specified.
keep(..., list = character(0), all = FALSE, sure = FALSE)
... |
objects to be kept, specified one by one, quoted or unquoted. |
list |
character vector of object names to be kept. |
all |
whether hidden objects (beginning with a . ) should
be removed, unless explicitly kept. |
sure |
whether to perform the removal, otherwise return names of objects that would have been removed. |
Convenient interface to rm()
when removing most objects from
the default workspace.
Implemented with a few safety caps: objects whose name starts with a
period ‘.
’ are not removed, and sure=TRUE
is
required to perform the removal.
A character vector containing object names, or NULL
when
sure
is TRUE
.
Arni Magnusson arnima@u.washington.edu
rm
.
data(women, cars) keep(cars) ## To remove all objects except cars, run: ## keep(cars, sure=TRUE)