[R] How packages are set up

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue May 1 18:41:04 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?

It is not slow: base is parsed every time R is started, for example.  Have
you tried this on a real package?  The largest current example, nlme,
takes 0.49 secs to load on my system, and that is wice the size of the
next largest.

However, as of about yesterday in the R-devel version there is an
option --save to INSTALL to create an image instead and make library()
load that.  It is not clear that is appreciably faster unless there
is more going on than parsing (like some actual computations).  (It also
unclear if it will ever be able to be done on a Mac.)

> 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?

Yes, or something very similar.  (For some packages I keep the master help
in S .d format in subdirectory help, for example.)

Brian

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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