[Rcpp-devel] strange behaviour ... something to do with RInside?
edd at debian.org
Tue Sep 8 16:29:18 CEST 2015
On 8 September 2015 at 09:28, Jonathon Love wrote:
| hi dirk,
| my application JASP makes use of RInside, and has for about two years
| now (https://jasp-stats.org). however, i've just found the most bizare
| bug. it only seems to occur under R 3.2.2 (from CRAN) under Ubuntu
| Trusty. the issue does not occur under R 3.0.2 (from the standard ubuntu
| repos), nor does it occur under R 3.2.2 on Ubuntu Vivid.
| the problem is, bizarely enough, to do with a call to stats::quantile( )
| stats::quantile(x, probs=0.01)
| within JASP, gives the error:
| "unused argument (probs = 0.01)"
| but calling it outside of JASP, in an R session run at the terminal,
| gives me the expected result.
| i have inspected the Version, the .libPaths(), everything between the
| terminal and JASP is identical.
| gives me the same (short) function definition in both environments
| if i run stats::quantile(1:10), inside of JASP, it gives me the exact
| vector back (rather than the quantiles)!
| if i go to the R SVN, and copy the stats::quantile.default() into the
| JASP R code, rename it, and substitute calls within JASP, everything
| works fine.
| there's also an issue with stats::as.formula() not working
| in typically JASP usage, dozens of R functions are called, and there
| don't seem to be any issues other than these, so it appears to be
| isolated to the stats package.
| the only difference i can see, is that one runs inside of RInside, the
| other at the terminal.
| any idea of what it could cause this?
We are aware of one issue between R 3.2.2 and Rcpp 0.12.0 which is due to
recent changes in R prior to the R 3.2.2 release. That is addressed in
Rcpp's master branch on GitHub so you could try that. It should also work
with R-devel. We are planning Rcpp 0.12.1 "relatively soon" because of this.
Hope that helps, if it doesn;t we need to dig deeper.
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel