[Rd] A possible improvement to apropos

Martin Maechler maechler at stat.math.ethz.ch
Fri Dec 15 08:56:31 CET 2006


>>>>> "Seth" == Seth Falcon <sfalcon at fhcrc.org>
>>>>>     on Thu, 14 Dec 2006 07:16:30 -0800 writes:

    Seth> Martin Maechler <maechler at stat.math.ethz.ch> writes:
    >> Hi Seth, Could you live with typing 'i=T' (i.e.
    >> ignore.case=TRUE)?

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

    Seth> Let me try to argue why I think the default should be
    Seth> case insensitive.

    Seth>    This is a _search_ function.  If you aren't even
    Seth> sure what something is called, how can you expect to
    Seth> know how it will be capitalized?  Making search
    Seth> functions less likely to return what the user is
    Seth> looking for seems quite odd to me.

okay, okay, yes, you've convinced me.
Thank you (and everyone else) for the feedback!

So the change will be {non-back-compatibly !} to ignore case in
apropos()

For find() -- on the same help page, similar topic --
it's less clear if a change should happen along similar lines.
Changing the *default* there is more problematic, since find()
is used, e.g., in getAnywhere().

I will probably not get to commit my changes before the weekend,
BTW.

Martin

    Seth>    Learning what functions are available has higher
    Seth> precedence, IMO, than being reminded about case
    Seth> sensitivity.  Imagine a user hoping to find 'getClass'
    Seth> that doesn't always remember case-sensitivity rules:
   
    Seth>        apropos("class") ## Doesn't find the function
    Seth> at all.  ## Writes a message to R-help without reading
    Seth> the posting guide

    Seth>        APROPOS("class") ## user: "oh, that looks like
    Seth> what I want" getclass("foo") ## user: "why didn't it
    Seth> work?" ... "ah, maybe I have to spell ## it exactly"
    Seth> getClass("foo") ## happy user

    Seth>    Remember, the _results_ will be displayed in proper
    Seth> case and a common next step (should be) to read the
    Seth> man page and possibly try an example -- especially if
    Seth> a first attempt fails.

    Seth> Have I made any progress?

indeed!



More information about the R-devel mailing list