[Rd] package development
Dirk Eddelbuettel
edd at debian.org
Sun Dec 14 21:32:55 CET 2008
On 12 December 2008 at 11:05, Paul Gilbert wrote:
| Yes, there are several options for not distributing tests. I was
| thinking more about how to distribute them with a simple mechanism for
| anyone to run them, but in a way that they are not run by the usual R
| CMD check.
One scheme I quite like (despite its "heavy" feel) is what Martin Maechler
had cooked up for the Rmetrics packages, based on earlier work by Gregor
Gorjanc in the gdata package:
-- it uses RUnit, so you get the full support of a mature unit testing
framework.
-- the tests are installed in inst/unitTests and hence available for tests
during package build as well as once installed which is nice as you can
re-rerun tests on installed packages
-- tests/ has a 'hook' script that calls the tests from ../inst/unitTests
during the 'R CMD check' run
Any Rmetrics package can serve as an example. I just checked with timeSeries.
It may be possible to detect whether these are called during R CMD check
or not. If not, it may be worth adding another variable, or value in
options() or whathaveyou to make it detectable.
Dirk
--
Three out of two people have difficulties with fractions.
More information about the R-devel
mailing list