From ripley@stats.ox.ac.uk  Tue Oct 22 17:39:05 2002
From: ripley@stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Tue, 22 Oct 2002 17:39:05 +0100 (BST)
Subject: RFC: Loading packages at startup
In-Reply-To: <3DB57448.F3A60B32@bank-banque-canada.ca>
Message-ID: <Pine.LNX.4.31.0210221732360.29174-100000@gannet.stats>

This is just one point in a proposal.  Clearly we need a switch to turn
re-loading off.

On Tue, 22 Oct 2002, Paul Gilbert wrote:

> "(Ted Harding)" wrote:
>
> > ... so that if the user invoked a function which
> > had been used in a previous session, packages needed would be loaded
>
> Am I correct in thinking the main need for this is for object
> definitions that require a package, rather than for methods? I have the
> impression that putting requires() in a function works fairly well. Or
> is it needed because methods for the objects need to be available?

The latter.  It also ensures that function conflicts are resolved
consistently.

> > A comment from a practical user's viewpoint. I'm not sure of the value
> > of having this happen automatically.
>
> I wonder about this too. Especially since I seem to spend much more time
> debugging code than I do actually using it. Should I be worrying about

That must be way out in the tail of R users, few of whom program at all.

> something similar to the mixed blessing of .a and .so executables? What
> happens when packages are updated, moved to new locations (as systems
> administrators are prone to do), or things are moved (among packages or
> in/out of base)? What happens when I want the version of a package I am
> trying to debug, not the one that is installed? Should there be a
> warning if the signature on a package does not match the one originally
> used?

Basically no problem:

Upgrades are no more problem than now.  (And now upgrading mclust can give
you a completely incompatible package, BTW.)

If a package is moved, then you would get a warning. But how often does
that happen?  Moving the R installation and the standad library would be
no problem as the location would be stored as `standard' in some way.

Versions are fine too, as the location would be recorded and you would get
the same version as last time (unles you moved it ...).

> I guess I would like to understand that this is a step forward in
> software design, not simply a minor user convenience (and possibly a
> headache for developers)? Sorry if I am a bit slow on some of these
> things.

It is a user convenience.  However, I think it makes life easier not
harder.

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

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


RFC: Loading packages at startup
ripley@stats.ox.ac.uk