[R] Loading a "sub-package"

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Oct 28 20:35:45 CET 2003


On Tue, 28 Oct 2003 Ted.Harding at nessie.mcc.ac.uk wrote:

> But MASS is huge! Hence the query. (I've also had occasion to filch
> single functions from other libraries as well).

MASS is *not* huge, and indeed is negligible compared to what is already
loaded.  nlme might be large, but few packages are noticeable and none are
huge ....

Luke and I (but principally Luke) have been experimenting with 
load-on-demand for R objects, and indeed MASS already does that for its 
data objects.  It's possible that this will be a non-issue by the next 
non-patch release.

Some data (R 1.8.0 --vanilla)

> gc()
         used (Mb) gc trigger (Mb)
Ncells 416460 11.2     597831   16
Vcells 113224  0.9     786432    6
> library(MASS)
> gc()
         used (Mb) gc trigger (Mb)
Ncells 463337 12.4     667722 17.9
Vcells 121995  1.0     786432  6.0

I'd fail any student who said `MASS was huge'.

I assume you don't have methods loaded if you are concerned about 
performance ....

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list