[R] Introductory Resources

Paul Gilbert pgilbert at bank-banque-canada.ca
Mon Jun 9 17:23:37 CEST 2003


RBaskin at ahrq.gov wrote
>...
> 1) I want a test suite for R.  I noted in the messages (Date: Mon Feb 24
> 2003 - 22:18:03 EST) that Prof Ripley wrote "Well, R itself  has lots of
> tests in its test suite (see directory tests in the sources) packages..."
> but I was too stupid to find them.  
> Q1: Can someone provide directions to this test suite that 
> even an idiot can follow?

This is an area where R really shines. I still test my code with Splus (3.3) but I switched to maintaining it in R because of the test (quality assurance) facilities for packages. The tests indicated above are in $(RHOME)/tests and can be run when  you build from source (in Linux or Unix) with

  ./configure
  make
  make check

I expect what you really want is your own test suite. To do this put your code in an R package (see "Writing R Extensions") and put the tests in the tests directory. If the test code executes stop() or ends abnormally for another reason, then checking or building the package will fail with an error message indicating a problem. If you are really interested in this I will expand sometime.

Paul Gilbert

Head Statistician/Statisticien en chef, 
Department of Monetary and Financial Analysis, 
     /Département des Études monétaires et financiers, 
Bank of Canada/Banque du Canada
234 Wellington St., 
Ottawa, 
Canada K1A 0G9 
(613) 782-7346




More information about the R-help mailing list