Re: [Rcpp-devel] testthat + sourceCpp

2017-01-25 Thread Tim Keitt
Figured it out. My snippet below does _not_ solve the problem of include paths. The key is to symlink ./inst/include to ./include. After that it works if I call "devtools::tests()". It fails however with "devtools::check(args = c('--as-cran'))". THK http://www.keittlab.org/ On Wed, Jan 25, 2017

Re: [Rcpp-devel] testthat + sourceCpp

2017-01-25 Thread JJ Allaire
Not 100% sure about this but I think the workaround for using sourceCpp within tests is to define R_TESTS="" (that's what we do in Rcpp and RcppParallel). Here's the code I'm thinking of: https://github.com/RcppCore/Rcpp/blob/master/tests/doRUnit.R#L42-L43 Note that we use RUnit in both of those p

[Rcpp-devel] testthat + sourceCpp

2017-01-25 Thread Tim Keitt
I have a package that compiles C++ at runtime using sourceCpp and I would like to use testthat with the package. Its clear that testthat sets up a non-standard environment and so it is difficult to combine it with sourceCpp. The first hurdle was include paths not working. This bit of code in the t

Re: [Rcpp-devel] Using Rcpp to solve ODEs: LSODE (deSolve) says "Confusion over the length of parms"

2017-01-25 Thread Tim Keitt
There's also https://github.com/thk686/odeintr (use the devel version, not CRAN -- need to upload a bug fix). THK http://www.keittlab.org/ On Wed, Jan 25, 2017 at 11:33 AM, Gibbons, Frank < frank.gibb...@astrazeneca.com> wrote: > Kyle, > > > > D’oh! You’re absolutely right. Embarrassing. :-} >

Re: [Rcpp-devel] Using Rcpp to solve ODEs: LSODE (deSolve) says "Confusion over the length of parms"

2017-01-25 Thread Gibbons, Frank
Kyle, D’oh! You’re absolutely right. Embarrassing. :-} (I’m told that’s the emoticon for ‘sheepish grin’.) I did try going the way suggested by deSolve, but find that (for reasons unknown to me), “R CMD SHLIB” compiles the object file but not the DLL (error about not having permission). I wasn