An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090124/bf7f3fd9/attachment-0001.pl>
Using help()
7 messages · Michael Kubovy, Rolf Turner, Brian Ripley +3 more
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}}
??'normal distribution' seems to do rather well. If you know that you want results from 'stats' you can confine the search to that package. 'normal' is such an overloaded word that searching for it is going to be overwhelming. At least 'Normal' is AFAIR only used in one sense in statistics. ``onr could argue that listing the standard and recommended packades at the top of the help.search results -- patches to do so would be considered. (Some of us keep other packages in separate libraries, in which case searching in R --vanilla does this automaticaly.) A quck look at a good book on S/R would solve such basic issues as quickly as anything.
On Sun, 25 Jan 2009, Rolf Turner wrote:
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}}
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Michael Kubovy wrote:
Dear R-helpers,
[...]
(2) If I remember dnorm() and want to be reminded of the call, I also get a list of pages.
It sounds to me like here you want: args(dnorm) Patrick Burns patrick at burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of "The R Inferno" and "A Guide for the Unwilling S User")
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.
_____________________________ Professor Michael Kubovy University of Virginia Department of Psychology Postal Address: P.O.Box 400400, Charlottesville, VA 22904-4400 Express Parcels Address: Gilmer Hall, Room 102, McCormick Road, Charlottesville, VA 22903 Office: B011; Phone: +1-434-982-4729 Lab: B019; Phone: +1-434-982-4751 WWW: http://www.people.virginia.edu/~mk9y/ Skype name: polyurinsane [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090125/8c57ff8d/attachment-0001.pl>
On Sun, 25 Jan 2009, Patrick Burns wrote:
Michael Kubovy wrote:
Dear R-helpers,
[...]
(2) If I remember dnorm() and want to be reminded of the call, I also get a list of pages.
It sounds to me like here you want: args(dnorm)
or, for functions hidden in a namespace, argsAnywhere().
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
On Jan 25, 2009, at 9:35 , Michael Kubovy wrote:
Dear Friends, Thanks to Rolf Turner, Brian Ripley and Patrick Burns for their answers.They don't quite resolve the problem, which I now realize is due to non-standard behavior of JGR, at least on my machine (I verified that Mac GUI works entirely as expected): **** My installation******************** Running the JGR GUI:
sessionInfo()
R version 2.8.1 (2008-12-22) i386-apple-darwin8.11.1 locale: C/C/en_US/C/C/C attached base packages: [1] grid stats graphics grDevices utils datasets methods [8] base other attached packages: [1] JGR_1.6-2 iplots_1.1-2 JavaGD_0.5-2 rJava_0.6-1 [5] MASS_7.2-45 lattice_0.17-20 loaded via a namespace (and not attached): [1] tools_2.8.1 ********What happens with "?" and "??" **************
"?" is interpreted by JGR (re-mapped to internal call to help followed by help.search if no topics were found) instead of R. So JGR is smarter than R used to be, but that has changed in R 2.8. Unfortunately R has currently no publicly available API to support what the Mac-GUI does, because it uses a nasty trick by modifying R's sources to hook inside R. I'm working on fixing this for R 2.9.0-to- be, but currently JGR is out of luck and has to rely on its own attempts to parse the command line, so the results will vary until then.
If I type "?normal" I get the long list, not "No documentation
found." When I type "?plot" I get the help page for plot {JM}, and
not plot.default {graphics}; when I type ?dnorm I get a rather long
list of help pages.
If I type "??normal"
I get
?normal.htm
.com.symantec.APSock
.com.symantec.aptmp
.DM_1039:1232634821l:DlnIrq
.DM_11869:1232818209l:m4AGyL
.DM_13345:1232655220l:C1js39
.DM_14309:1232822090l:e6wvqw
.DM_15688:1232659145l:ffZvPg
.DM_16640:1232825979l:n5TrAz
.DM_18040:1232662823l:Gb81yX
?
******** Another JGR problem **************
Help pages for newly installed packages are accessible only after
JGR is restarted.
I can see what could cause that, but in theory that should affect all html-based systems if R really doesn't update the links. I didn't actually look but it's possible that JGR just needs to call make.packages.html() -- in effect, try calling that function and if that solves your problem that's what's it is ... Cheers, S
Thanks, MK On Jan 24, 2009, at 8:54 PM, Rolf Turner wrote:
On 25/01/2009, at 2:33 PM, Michael Kubovy wrote:
? (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. ?
? 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. ? Rolf Turner
_______________________________________________ stats-rosuda-devel mailing list stats-rosuda-devel at listserv.uni-augsburg.de http://mailman.rz.uni-augsburg.de/mailman/listinfo/stats-rosuda-devel