[R] Reading help functions

Rasmus Liland jr@| @end|ng |rom po@teo@no
Thu Jul 23 03:19:30 CEST 2020


On 2020-07-22 19:42 -0400, Duncan Murdoch wrote:
> On 22/07/2020 1:20 p.m., Pedro páramo wrote:
> > Hi all,
> > 
> > I am trying all time to use ?? help 
> > function but most of the time it 
> > cost me a lot to understand what 
> > they are saying, explaining, there 
> > is some manual to step by step how 
> > to interpret help guides in R.
> > 
> > I hope you can understand me because 
> > of my english its not the best 
> > also.
> 
> The manuals that come with R give more 
> of an overview than the individual 
> help pages.  "An Introduction to R" is 
> the basic introduction.  You should 
> read that first, then go to the help 
> pages when you need detailed technical 
> information about a particular 
> function.
> 
> To see the manuals, run help.start() 
> and click on one of the links near the 
> top of the page.
> 
> If your problems are with help pages 
> from contributed packages, then you 
> should look for vignettes in the 
> package.  Not all packages have them, 
> but it's a sign of a lack of interest 
> in documentation if they don't: and 
> I'd recommend avoiding such packages.
> 
> To see the vignettes for 
> "somepackage", run 
> 
>  browseVignettes(package = "somepackage")

Dear Pedro,

I also use ?? alot.  Recently I found it 
really useful to list the functions of a 
recently installed package somepackage, 
using these to lines:

	library(somepackage)
	ls.str('package:somepackage')

I just put them in a script to run it 
quickly in the shell like this:

	#!/usr/bin/env Rscript
	pkg <- commandArgs(trailingOnly=TRUE)[1]
	
	text <-
	  paste0("library(",
	         pkg,
	         "); ls.str('package:",
	         pkg,
	         "')")
	eval(parse(text=text))

Best,
Rasmus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20200723/d7a871da/attachment.sig>


More information about the R-help mailing list