[Rcpp-devel] more on stats functions

Davor Cubranic cubranic at stat.ubc.ca
Thu Dec 9 17:51:01 CET 2010


See Runit::defineTestSuite and its testFileRegexp and testFuncRegexp parameters.

In each project I work on, one of the first things I set up is a little RScript helper that runs a particular test suite. Also, instead of sourcing files directly, this script adds the Rcheck directory to the front of .libPaths, so that I can 'require' the package and know I'm testing the most recent code. The drawback is that I have to 'R CMD check' every time after I make a change to the source before running the tests. (I guess using Make would take care of that.)

Davor


On 2010-12-08, at 7:54 PM, Christian Gunning wrote:

> Is there a convenient way to run only and all of the tests in
> runit.stats.R?  Other than running *all* the Rcpp unit tests, the best
> I found was doing individual tests with:
> 
> rm(.rcpp.stats)
> rm(.setUp)
> source('~/src/rcpp/pkg/Rcpp/inst/unitTests/runit.stats.R')
> .setUp()
> test.stats.dnorm()
> 
> best,
> xian



More information about the Rcpp-devel mailing list