[R] Cleaning things up?

Jan Goebel jgoebel at diw.de
Tue Oct 17 17:02:22 CEST 2000


Hello,

a bit complicated but a quick solution:

> as <- function(x) { eval(as.name(x)) }
> rm(list=ls()[! sapply(sapply(ls(),"as"),"is.function")])


jan

On Tue, 17 Oct 2000, Yves Gauvreau wrote:

> Hi,
> 
> I know it must be written somewhere but I can't find it.
> 
> I'd like to remove all variables or objects that I've created but not the
> functions. I look at a few things without success. Is there a R way of doing
> this? There are to many to create a manual list.
> 
> Thanks in advance.
> 
> Yves Gauvreau
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
-----------------------------------
Jan Goebel (mailto:jgoebel at diw.de)

DIW German Institute for Economic Research
SOEP
Königin-Luise-Str. 5
D-14195 Berlin
Germany

phone: 49 30 89789-377
-----------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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