Re: [R-pkg-devel] Data for unit testing in packages

2016-05-20 Thread Hadley Wickham
If you're using testthat, check out expect_equal_to_reference. Hadley On Fri, May 20, 2016 at 7:45 PM, carlos cinelli wrote: > Do you guys have any suggestions on how to store data for unit testing? > > I am implementing some methods to estimate matrix entries from the > marginals. The input of

Re: [R-pkg-devel] Data for unit testing in packages

2016-05-20 Thread Kasper Daniel Hansen
Very similar here. I use the RUnit framework, which has testing scripts in inst/unitTests I put scripts for creating the test data in inst/testData and save rda files into inst/unitTests I create the data set by R CMD BATCH and I save the .Rout file which creates the test data, so I have a

Re: [R-pkg-devel] Data for unit testing in packages

2016-05-20 Thread Ben Bolker
I usually put it in inst/testdata and access it via system.file() On 16-05-20 01:45 PM, carlos cinelli wrote: > Do you guys have any suggestions on how to store data for unit testing? > > I am implementing some methods to estimate matrix entries from the > marginals. The input of the functio