[R] remove objects(1-20, 25-30) OR remove objects(...) except(...)??
Tony Plate
tplate at blackmesacapital.com
Thu Jul 25 17:36:40 CEST 2002
You can remove everything but specified objects using setdiff()
> a <- 1
> b <- 2
> c <- 3
> objects()
[1] "a" "b" "c"
> rm(list=setdiff(objects(), "a"))
> objects()
[1] "a"
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list