R-beta: directory of functions

Z. Todd Taylor zt_taylor at pnl.gov
Fri Jun 20 17:26:12 CEST 1997


Richard Lammers <lammers at edac.sr.unh.edu> wrote:

> Is there any way to create a directory of functions in R?
> 
> In the past, when using S, I have used attach() to point to a
> directory holding a set of functions.  This does not seem to work in R:
> 
> > attach(".Functions")
> Error: attach only works for lists and data frames
> 
> 
> Is there any way to keep the data separate from functions?
> 
> 
> I suppose one approach would be to store the functions as text files and
> source() them from .Rprofile
> 
> Is this the way most R users are currently dealing with this?

I think you're touching on the reason I fear R may never be
useful to me in many of my projects.

Accommodating the new scoping rules has required R to completely
take over the administration of "databases."  It is no longer
easy to maintain a "directory" of similar objects.  And if I do
have such a collection, R must load *all* of them into memory in
order to use just one of them.  Also, I can no longer have
transparent access to foreign data via S's user-defined database
mechanism.

The change was made in the interest of speed, but that will only
happen for "small" datasets.  I'm not sure the benefits of cleaner
random number generator functions is worth what we lost.

Does anyone else have these fears?  Is there a way to have both?

--Todd
-- 
Z. Todd Taylor
Pacific Northwest National Laboratory
zt_taylor at pnl.gov
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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