[R] avoiding reinstall already installed *package*

Peter Ehlers ehlers at ucalgary.ca
Tue May 18 18:42:40 CEST 2010

On 2010-05-18 10:05, (Ted Harding) wrote:
> On 18-May-10 15:49:37, Martin Maechler wrote:
>> { I've modified the subject; I can't stand it hitting square into
>>    my face ... }
>>>>>>> "mr" == milton ruser<milton.ruser at gmail.com>
>>>>>>>      on Tue, 18 May 2010 12:36:23 -0300 writes:
>>      mr>  Dear R-experts,
>>      mr>  I am installing new libraries using
>>      mr>  install.packages("ggplot2",dependencies=T).
>>      mr>  But I perceive that many dependencies are already installed.
>>      mr>  As I am using a low-band internet, how can avoid reinstall
>>      mr>  installed libraries?
>> There's no problem with installed libraries, as ...
>> they DO NOT EXIST.
>> These are *PACKAGES* !
>> Why do you think are you talking about the function
>>   install.packages()  ????
>>           ^^^^^^^^
> Ah, Martin! I know that "package" is the official terminology,
> but R itself tempts the naive user into deviating from the
> True Path. Indeed, I had my fingers burned by this myself,
> a long time ago (I'm still licking them ... ).
> One might ask: "Why do you think we use the function library()?"
> when loading add-on packages into R. Indeed, the very directory
> tree of R itself stores packages under /usr/lib/R/library.
> So, once in a while, someone gets it wrong, and has to find it
> out the hard way!

Well, I don't know if I've ever disagreed with Ted before,
but here I would (somewhat) disagree. It seems a bit odd that
nobody confuses 'book' with 'library', yet the package/library
problem is persistent. It may have something to do with the
use of 'library' in other computer languages.

Anyway, not long ago there was a suggestion (Rolf Turner's?)
to rename the library() function to something like use(),
but, as I recall, a number of nontrivial objections were

Of course R stores packages in libraries. That's were books
*should* reside. And it's a good idea to have Martin remind
us now and again that books themselves are not libraries.

But I must confess that I'm no longer much bothered by the
misuse. If it ever leads someone astray in their code, then,
well, they have only themselves to blame.

Peter Ehlers

More information about the R-help mailing list