>>>>> "CG" == Christophe Genolini <[EMAIL PROTECTED]> >>>>> on Mon, 31 Mar 2008 00:31:55 +0200 writes:
>> >> Generally I find it's good to look at examples that work. >> For examples of packages using tests, look at source >> packages on CRAN. Run the tests on them (using R CMD >> check), and see what gets produced. >> CG> Do you have the name of a package that use it ? I try CG> the 10 first package, and 10 other at random, but none CG> of them use tests... hmm, I see 219 out 1378 CRAN packages having a 'tests' subdirectory, so it seems you have been a bit unlucky. ;-) Also note that 'R CMD check' runs all the examples in the help files and hence does some testing already without extra tests in ./tests/ Isn't all this is explained nicely in the "Writing R Extensions" Manual? Or are there sections we should expand ? For answering your subsequent questions, you should probably both look at an example package *and* read the 'Writing R Extensions' manual a bit more "closely". BTW: There's an extension to simple regression tests in the ./tests/ directory, namely using the 'RUnit' package for unit tests **IN CONJUNCTION** with ./tests/ : The R Wiki has had a note on that for many months, http://wiki.r-project.org/rwiki/doku.php?id=developers:runit and we have recently nicely implemented a version of this approach in most Rmetrics R packages, e.g. 'fCalendar' as one example. It builds on a simple tests/doRunit.R file and then on content in inst/unitTests/ Martin Maechler, ETH Zurich ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel