[R] slow loading with lme4

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jun 13 08:44:03 CEST 2005


On Mon, 13 Jun 2005, ronggui wrote:

> it takes a long time to load the lme4 package.anyone else encounter this 
> problem?

Yes: ca 10 secs on my machine.  Why do you call it a `problem', though?

>> system.time(library(lme4))
> ÔØÈëÐèÒªµÄ³Ì¼­°ü£ºMatrix
> ÔØÈëÐèÒªµÄ³Ì¼­°ü£ºlattice
> [1] 19.90  0.30 25.56    NA    NA

Profiling this shows that almost all the time is spent on setting up S4 
methods:

$by.total
                              total.time total.pct self.time self.pct
"eval"                            10.32     100.0      0.02      0.2
"library"                         10.32     100.0      0.00      0.0
"system.time"                     10.32     100.0      0.00      0.0
"<Anonymous>"                      9.92      96.1      0.00      0.0
"insertMethod"                     8.62      83.5      1.86     18.0
"getAllMethods"                    8.36      81.0      0.00      0.0
"mergeMethods"                     7.94      76.9      0.00      0.0

I am sure the packages' authors are aware of that.

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