There is a mechanism for testing code in R packages (R CMD check), see
the Writing R extensions manual. If you need more flexibility for your
tests, you could look at RUnit on CRAN, or svUnit on R-Forge
(http://r-forge.r-project.org, on CRAN soon). For the later one, you
install it by:
I think the OP was asking about test suites that test the software.
The R package structure includes a test/ directory which you can use
to put tests.
For example, in the onion package I check that I have got my
signs and multiplication table correctly implemented:
stopifnot(Hi*Hj == Hk)
Hi Nathan,
in addition to what others have already mentioned there is some documentation
in the Writing R Extensions Manual:
- on the supported structure of packages, indicating where test code might be
added
http://stat.ethz.ch/R-manual/R-patched/doc/manual/R-exts.html#Package-subdirectories
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I was wondering if anyone could point me in the right direction for reading up
on writing tests in
R. I'm writing some functions for inclusion into a package and would like to
test them to ensure
they're doing what I expect them to do.
Are these
4 matches
Mail list logo