Soeren Sonnenburg
2009-Mar-05 08:33 UTC
[Rd] calling Rf_initEmbeddedR twice gives an error
Dear all, I've written a R to python/octave/r translator that (so you can call python from R etc and vice versa) enabling you to e.g. call matplotlib which just runs fine on the first command when I do Rf_initEmbeddedR(2, argv); Rf_endEmbeddedR(0); Rf_initEmbeddedR(2, argv); Rf_endEmbeddedR(0); I get this error Error in .Call("R_isMethodsDispatchOn", onOff, PACKAGE = "base") : Incorrect number of arguments (2), expecting 1 for R_isMethodsDispatchOn Error in gzfile(file) : invalid 'encoding' argument Fatal error: unable to restore saved data in .RData I've recognized that there were others with that problem - which is marked user error here http://bugs.r-project.org/cgi-bin/R/trashcan?id=12644;user=guest;selectid=12644 Unfortunately it is nowhere stated what one should have called... Any of R_dot_Last(); R_RunExitFinalizers(); R_gc(); does not help either... However I can trigger the problem on the R cmdline when I do: .Call("R_isMethodsDispatchOn", 1,2, PACKAGE = "base") : also looking at src/main/registration.c I don't see a reason why it should be wrong: CALLDEF(R_isMethodsDispatchOn, 1)... Any ideas? Soeren