[Rd] Error message library()
simon.urbanek at r-project.org
Wed Oct 26 19:24:48 CEST 2011
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.
More information about the R-devel