From proebuck at mdanderson.org  Thu Oct 27 17:52:21 2011
From: proebuck at mdanderson.org (Roebuck,Paul L)
Date: Thu, 27 Oct 2011 10:52:21 -0500
Subject: [Rd] Error message library()
In-Reply-To: <1319626156.18216.15.camel@milan>
Message-ID: <CACEE865.22FB0%proebuck@mdanderson.org>

On 10/26/11 5:49 AM, "Milan Bouchet-Valat" <nalimilan at club.fr> wrote:

> Le mercredi 26 octobre 2011 ? 09:46 +0000, ONKELINX, Thierry a ?crit :
>
>> When one tries to load a non-installed package you get the error:
>>
>> Error in library(xyz) : there is no package called 'xyz'
>>
>> I noticed on several occasions that this puzzles beginners. Therefore
>> I suggest to change the error description in:
>>
>> Error in library(xyz) : there is no package called 'xyz' installed on
>> this machine. Check the name of the package or
>> use
install.packages("xyz") to install it.
>
> Couldn't R even directly ask for installing if it exists on CRAN? Like:
> Error in library(xyz) : package 'xyz' is not installed on this machine.
> Do you want to install it? [Y/n]

I'd agree the message should be reworded, but prompting is overkill
for normal users.

Error in library(xyz) : package 'xyz' is not installed.

Nonetheless, Kevin Wright's function is interesting.



[Rd] Error message library()
Roebuck,Paul L