[Rd] Error message library()

Milan Bouchet-Valat nalimilan at club.fr
Wed Oct 26 19:05:11 CEST 2011


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).

> 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)

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).


Regards



More information about the R-devel mailing list