dkaschek / dMod

Dynamic modeling and parameter estimation in R
19 stars 7 forks source link

RJSONIO issue in steady state calculation #40

Open burgerga opened 5 years ago

burgerga commented 5 years ago

When using the steadyStates functionality what can/will happen at some point is

> steadyStates(f, file="steadyStates")
Error in .Call("R_fromJSON", content, as.integer(sum(simplify)), nullValue,  : 
  "R_fromJSON" not resolved from current namespace (RJSONIO)

It can be circumvented by restarting your R session. It is not a bug in dMod, but maybe it could be added to the steadyStates documentation. The bug in is caused by RJSONIO in rPython (see more details here: https://github.com/r-lib/devtools/issues/427 (even Hadley Wickham gave up on it it seems)), but since the latest rPython release is from 2015 I do not see this getting fixed.

So an alternative solution would be switching to the reticulate package developed by the rstudio people. It works nice with different python envs, and it even has some guidelines on how to use it in your R package, and how to include it in unit testing: https://rstudio.github.io/reticulate/articles/package.html

burgerga commented 5 years ago

@marcusrosenblatt

marcusrosenblatt commented 5 years ago

For the moment, I added it to the documentation of steadyStates() and symmetryDetection(). Not sure whether we will switch to reticulate in the future. I will look into this.