[R] Re: Packages and Libraries
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Feb 10 08:41:56 CET 2005
On Wed, 9 Feb 2005, Spencer Graves wrote:
> The reasons to 'introduce "package()" and deprecate "library()"' may be
> OBVIOUS to you, but they completely escape me. Could you please clarify why
> that's obvious? I've seen many admonitions on this list that the term is
> "package" NOT "library", but I don't recall ever seeing any explanation of
> why the term "package" is more appropriate than "library".
> I suspect there may be some rationale that "package" seems more
> appropriately descriptive. However, is it so much more precise that it
> justifies creating a distinction between S-Plus and R?
Note that S(-PLUS) does not use `library' for `package', it uses `library
section', and that is in the 1988 Blue Book, the manual for the first
version of S which was extensible in that way. Only a few observant
people used `library section', and when S4 introduced `chapter' (almost
but not quite the same thing) few people adopted that either.
There is a need to change the programmatic interface to what
library/require do, for example to take character string (only) arguments
and to return a suitable classed object, as well as separate out
library(help=). This will almost certainly be done (if/when it is done) so
that library() remains for ever as a compatibility wrapper, but the new
interface (usePackage(), use(), whatever) becomes the preferred one.
--
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