[R] Using help()

Rolf Turner r.turner at auckland.ac.nz
Sun Jan 25 02:54:03 CET 2009


On 25/01/2009, at 2:33 PM, Michael Kubovy wrote:

> Dear R-helpers,
>
> I wonder if you can give me advice about the best way to use help().
>
> (1) If I type ?normal because I forgot the name dnorm() I get a long
> list of relevant pages. Getting to right page is laborious.
>
> (2) If I remember dnorm() and want to be reminded of the call, I also
> get a list of pages.
>
> Advice?
>
> It seems to me that if the output of help() listed base functions
> first, it would go a long way toward improving the usefulness of this
> function.

I get the impression that you are confusing ``??'' and ``?''.

If you type ``?normal'' you get a ``No documentation found'' message.

If you type ``??normal'' you indeed get a long list of pages, some of
which might be relevant.  (If you want help on ``dnorm'' then the  
relevant
page is stats::Normal.  And then typing ``?Normal'' gets you what you
want.  Which is somewhat on the obscure side of obvious, IMHO.)

If you type ``?dnorm'' then you get exactly what you want immediately.
Exactly?  Well, there's also info on pnorm, qnorm, and rnorm, but I
expect you can live with that.

Note that listing base functions first won't help you at all in this
instance, since dnorm is in ***stats***, not in ***base***.

There is no easy answer to ``How do I find the right function when I
can't remember its name?''.  The ``??'' construct, RSiteSearch(),
some Wiki-s that lurk about the traps, the task views on CRAN, and a
few other things all help, but none of them solves the problem  
completely.
When all else fails, post to this list and resign yourself to the fact
you'll probably get a flame along with the answer to your question!

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}




More information about the R-help mailing list