[Rd] require vs library

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Sun Feb 23 13:53:02 2003


On 23 Feb 2003, Peter Dalgaard BSA wrote:

> "kjetil brinchmann halvorsen" <kjetil@entelnet.bo> writes:
> 
> > mva and grid has been loaded without any warning. Everybody knows 
> > lattice requires grid, but why mva?
> 
> As far as I recall it is for the dist() function, which gets used in
> some spatial/longitudinal models.

More precisely, it autoloads dist from mva, so you get mva if and only
if you use a function that uses it, and it seems that is corSpatial.

lattice autoloads loess and loess.smooth from modreg.

I don't like autoloads for this reason: they change the search path 
without warning.   Hopefully by 1.8.0 we will have better mechanisms
(import from namespaces, on-demand loading of objects from databases 
which allows all the base and recommended packages to be attached with 
negligible penalty).

-- 
Brian D. Ripley,                  ripley@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