[Rd] JRI and error message from R_isMethodsDispatchOn
Keith
keithc.y.li at gmail.com
Fri Nov 19 19:40:54 CET 2010
Dear R users,
I have a small project written in Java and need some statical tools.
Therefore, I used JRI (in rJava package) as an interface between R and
Java to write some wrappers for my work. However, I received error
message from R while I have more than one java method which wraps R:
Error in .Call("R_isMethodsDispatchOn", onOff, PACKAGE = "base") :
Incorrect number of arguments (2), expecting 1 for R_isMethodsDispatchOn
The Java pseudo code would be like:
public class Test{
public static void main(String[] args){
...
objA.do;
objB.do;
...
}
}
Each do method actually calls R to do the job. I already know R is
single-treaded so I implemented end method in Rengine class to shutdown
R in each method. I thought this won't cause multi-thread problems in
this case because I terminate/destroy each R thread before I call
another one. But, it seems that it's still considered as 2 threads. Did
I miss something? or probably, I have to set-up JRI server for my
project? or other recommendations for my purpose?
R version: 2.11.1
rJava version: 0.8-4
OS: Arch Linux
Best,
Keith
More information about the R-devel
mailing list