Richard Pearson wrote:
?rm

Richard


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.

[...]

Ralf

More on the use of rm. If you want to delete many variables in one go,

x<-runif(10)
y<-runif(10)
z<-runif(10)
ls() #you check all the objects in your workspace
#[1] "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
ls()
[1] "x"

HTH
Rubén

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to