[R] deleting variables
rroa at udec.cl
Tue Apr 29 18:09:25 CEST 2008
Richard Pearson wrote:
> Ralf Goertz wrote:
>> How can I automatically exclude one variable from being saved in the
>> workspace when I quit an R session? The problem is I don't know how to
>> erase a variable once it has been created.
More on the use of rm. If you want to delete many variables in one go,
ls() #you check all the objects in your workspace
# "x" "y" "z"
rm(list=your.list <- ls()[2:3]) #you selected to delete all those
objects whose indices are between 2 and 3.
rm("your.list") #remove the temporary list with variable names
More information about the R-help