[Rd] A possible improvement to apropos
Seth Falcon
sfalcon at fhcrc.org
Thu Dec 14 16:16:30 CET 2006
Martin Maechler <maechler at stat.math.ethz.ch> writes:
> Hi Seth,
> Could you live with typing 'i=T' (i.e. ignore.case=TRUE)?
I can live with my ~/.Rprofile, I suppose. :-)
> In principle, I'd like to keep the default as ignore.case=FALSE,
> since we'd really should teach the users that R
> *is* case sensitive.
> Ignoring case is the exception in the S/R/C world, not the rule
Let me try to argue why I think the default should be case
insensitive.
This is a _search_ function. If you aren't even sure what
something is called, how can you expect to know how it will be
capitalized? Making search functions less likely to return what
the user is looking for seems quite odd to me.
Learning what functions are available has higher precedence, IMO,
than being reminded about case sensitivity. Imagine a user hoping
to find 'getClass' that doesn't always remember case-sensitivity
rules:
apropos("class")
## Doesn't find the function at all.
## Writes a message to R-help without reading the posting guide
APROPOS("class")
## user: "oh, that looks like what I want"
getclass("foo")
## user: "why didn't it work?" ... "ah, maybe I have to spell
## it exactly"
getClass("foo")
## happy user
Remember, the _results_ will be displayed in proper case and a
common next step (should be) to read the man page and possibly try
an example -- especially if a first attempt fails.
Have I made any progress?
Regards,
+ seth
More information about the R-devel
mailing list