Re: [R] advice on crafting examples for packages

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Sat 09 Apr 2005 - 18:07:27 EST

So an average example takes 30secs? I don't think your users are going to be too happy with that, whereas 100Mb is no problem these days (quite a few package tests get there).

I would suggest putting the examples in \dontrun, and putting a selection in a test suite or a vignette, with an optional test to run them all.

As a guide, in my tests I allow a maximum of 5 minutes CPU for an R run (and only one package hits the limits). Also take a look at

http://cran.r-project.org/src/contrib/checkTimings.html

where only 5 packages take more than 5 minutes for R CMD check, and the average is around a minute. So you should be aiming well under 5 mins for R CMD check.

On Sat, 9 Apr 2005, Peter E. Rossi wrote:

> Folks-
>
> I have developed a package which I am planning on posting to CRAN.
>
> I include examples for each of the 40 or so functions in the package.
> However, since the examples are non-trivial and the package is
> using MCMC simulation methods, it takes about 20 minutes to run the complete
> set of examples on a 2.8 Ghz windows PC. The R process reaches a high
> water mark of about 100 MB of memory as well.
>
> I would appreciate some guidance on this.
>
> many thanks!
>
> peter
> ................................
> Peter E. Rossi
> peter.rossi@ChicagoGsb.edu
> WWW: http://ChicagoGsb.edu/fac/peter.rossi
> SSRN: http://ssrn.com/author=22862
> QME: http://www.kluweronline.com/issn/1570-7156
>
> ______________________________________________
> R-help@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
>

-- 
Brian D. Ripley,                  ripley@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

______________________________________________
R-help@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
Received on Sat Apr 09 18:16:40 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:05 EST