[R-pkg-devel] Data for unit testing in packages
Kasper Daniel Hansen
kasperdanielhansen at gmail.com
Fri May 20 21:01:40 CEST 2016
Very similar here. I use the RUnit framework, which has testing scripts in
I put scripts for creating the test data in
and save rda files into
I create the data set by R CMD BATCH and I save the .Rout file which
creates the test data, so I have a record of which packages / versions was
used to create it.
On Fri, May 20, 2016 at 2:34 PM, Ben Bolker <bbolker at gmail.com> wrote:
> 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 function is the row and column sums and the
> > output is a N x N matrix.
> > What I am doing today is constructing the expected output by hand.
> > One example I am testing is a 7 x 7 matrix, which is fine to just put the
> > code to create it on the test script.
> > However, I also want to create tests on larger examples, say a 1000 x
> > matrix, in which it would not be very handy to leave the code on the
> > Do you have any suggestions or best practices for that?
> > Best,
> > Carlos
> > [[alternative HTML version deleted]]
> > ______________________________________________
> > R-package-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> R-package-devel at r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-package-devel