Re: R-beta: directory of functions

Z. Todd Taylor (
Fri, 20 Jun 1997 08:26:12 -0700

Date: Fri, 20 Jun 1997 08:26:12 -0700
From: (Z. Todd Taylor)
Subject: Re: R-beta: directory of functions

Richard Lammers <> 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

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?

Z. Todd Taylor
Pacific Northwest National Laboratory
r-help mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: