[R] Cleaning things up?
Roger Koenker
roger at ysidro.econ.uiuc.edu
Tue Oct 17 17:12:46 CEST 2000
In Splus, I've found the following function useful for this purpose:
> os <- function(mode = "function", where = 1, long = F)
{
z <- objects.summary(where = where, mode = "function")
if(long)
return(z)
else return(row.names(z))
}
but it appears that there is no equivalent of objects.summary for R...or
am I wrong about this?
url: http://www.econ.uiuc.edu Roger Koenker
email roger at ysidro.econ.uiuc.edu Department of Economics
vox: 217-333-4558 University of Illinois
fax: 217-244-6678 Champaign, IL 61820
On Tue, 17 Oct 2000, Yves Gauvreau wrote:
> Ok, that's sounds reasonable for the future. The problem I have is that I
> have close to 500 items returning from length(ls()) many of which are
> function I've created on the fly and they interact with each other. I know
> it's a mess and this the reason for my query, I'd like to clean it up. I
> mean separating functions from other objects (saving them, document them and
> etc.) and do as you suggest for the future.
>
> So I ask again, is there a way to do that or do I have to do it all by
> "hand" one at a time?
>
> Yves Gauvreau
>
> ----- Original Message -----
> From: "Douglas Bates" <bates at stat.wisc.edu>
> To: "Yves Gauvreau" <cyg at sympatico.ca>
> Cc: <r-help at stat.math.ethz.ch>
> Sent: Tuesday, October 17, 2000 9:46 AM
> Subject: Re: [R] Cleaning things up?
>
>
> > "Yves Gauvreau" <cyg at sympatico.ca> writes:
> >
> > > 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.
> >
> > The preferred way to do this is to create a private R package of your
> > functions. The manual "Writing R Extensions" available in the
> > doc/manual section of the sources and in many of the binary
> > distributions describes how to do this. It may seem overkill to do
> > this initially but it later becomes a very valuable technique for
> > keeping projects distinct. It is worth the time spent learning to do
> > this.
> >
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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