[R] How packages are set up

Thomas Lumley tlumley at u.washington.edu
Tue May 1 18:38:01 CEST 2001

On Tue, 1 May 2001, Frank E Harrell Jr wrote:

> In trying to get more familiar with R I have two questions.
> 1. For large packages it would be slow to parse all R source
> code for the package each time library() is issued.
> Yet I haven't found where a package's functions are stored
> in in .RData format.  Would someone please clarify this?

Well, the R source code *is* all parsed each time library() is issued, and
it isn't that slow. On my system (with network drives) it is less than a
second even for nlme, survival5, and MASS.  I don't think .RData format
would be that much faster.  The time to load the ratetables dataset in
survival5 (which is in .RData format) and to load the nlme package are
similar, and they are about the same size.

> 2. Have package developers found that it works best to
> maintain packages locally using the same directory structure
> described in "Creating R Packages" in the "Writing R
> Extensions" manual?

That's what I do.


Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

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