Re: [R] advice on crafting examples for packages

From: Prof Brian Ripley <>
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

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
> WWW:
> QME:
> ______________________________________________
> mailing list
> PLEASE do read the posting guide!

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide!
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