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?). Thanks, Sarah -- Sarah Goslee http://www.stringpage.com [[alternative HTML version deleted]]
On Wed, 5 Apr 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"?This is generally done by including example(B) or some such in the examples for C. (And you will want to mark them by \dontrun().)> 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?).A demo is an alternative approach. -- 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
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
On Wed, 5 Apr 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?).Why not use a vignette? Documenting a process involving multiple functions is exactly what vignettes are designed for. -thomas Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle