From simon.urbanek at r-project.org  Wed Oct 26 19:24:48 2011
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Wed, 26 Oct 2011 13:24:48 -0400
Subject: [Rd] Error message library()
In-Reply-To: <1319648716.18216.38.camel@milan>
References: <AA818EAD2576BC488B4F623941DA74275556099D@inbomail.inbo.be>
	<1319626156.18216.15.camel@milan>
	<1EE3E368-AEF7-450C-9331-234A7CBEAE4E@r-project.org>
	<1319648716.18216.38.camel@milan>
Message-ID: <DB47B86B-78EE-49B5-A80D-DF770A2222DB@r-project.org>


On Oct 26, 2011, at 1:05 PM, Milan Bouchet-Valat wrote:

> Le mercredi 26 octobre 2011 ? 12:34 -0400, Simon Urbanek a ?crit :
>> Please, no! We don't want to enter the realm of the computer assuming
>> it knows what you want to do (which is becoming too common nowadays,
>> unfortunately, making the interaction more and more annoying). For
>> some users this error simply means that they mistyped the package
>> name, so fetching CRAN repos on that behalf ranges somewhere between
>> overkill and stupidity.
> If we need to connect to CRAN to do that, I indeed withdraw my
> suggestion. I had in mind a feature that's present in Bash in some
> recent Linux distributions: when a program doesn't exist on the system,
> tell the user in what package it can be found (it also detects typos in
> program names).
> 

Yes, and that thing drives me crazy so the first thing I do on Ubuntu is to remove it (which is not as easy as it should due to a bug in the bash script as it turns out - another story :P). In 99% of cases it's useless since the suggestions are based on typos ...


>> If the user can't type install.packages() then I am certainly not
>> confident that the user can use R for any reasonable data analysis.
> There's certainly some truth in your statement. ;-)
> 
> OTOH it seems package authors have tried raising the barrier to a quite
> high level, and even when knowing what you do, you can get the package
> names wrong. Consider for example :
> Snowball, but snow and snowfall
> rJava and rJython, but RODBC and RWeka
> (not to pick on Kurt at all, there are many other examples, but I'm
> mainly using these - great - packages)
> 

Well, seeing one of my packages on the list I have to say that there were good reasons, albeit they may not be known to the user, especially since the reasons may be obsolete by now.


> Maybe a less controversial improvement would be to ask "Did you mean
> XXX?" if a package with a very similar name is *installed*. That
> wouldn't require fetching information from CRAN, and would most of the
> time be helpful (people install packages they use).
> 

Yes, that could be an optional feature -- I do want to stress the *optional* in the sentence, though.

BTW: an ever more intuitive solution (IMHO) would be to auto-complete package names in library( ... Deepayan? ;) That is non-intrusive and in line with the general use of R.

Cheers,
Simon


> 
> Regards
> 
> 



[Rd] Error message library()
Simon Urbanek