[R] package docs: examples format

Uwe Ligges ligges at statistik.uni-dortmund.de
Wed Apr 5 15:49:42 CEST 2006


Sarah Goslee wrote:

> Hello,
> 
> The package I'm finishing up contains a series of functions
> intended to be run one after the other, as in:
> do data-prep using A()
> run complicated, slow, analysis B()
> do complicated, slow additional analysis C()
> plot the results with D() and E()
> 
> Now, in the documentation for each of those functions,
> I put the entire sequence to illustrate the proper sequence.
> But this means that the time-consuming B() and C() run several
> times during package checking, taking far too long.
> 
> I know that I can use
> \dontrun{B()}
> to show the sequence in the help without actually executing it each time.
> 
> Is that the preferred approach, or is there something "nicer"?
> Ideally, I'd like to include one global example that covers all related
> functions, but I can't find a way to do that neatly (other than possibly
> a vignette?).


What about an additional help page that relates to the whole package 
rather than to a single function and contains the examples? Each 
function's help page can point with a \link{} to that help page.

Uwe Ligges



> Thanks,
> Sarah
> 
> --
> Sarah Goslee
> http://www.stringpage.com
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list