java - Can't get RCaller to to run simple example -
i trying run simple example of rcaller on windows 7 machine.
rcaller caller = new rcaller(); rcode code = new rcode(); caller.setrscriptexecutable("c:\\program files\\r\\r-3.2.1\\bin\\rscript.exe"); double[] numbers = new double[]{1, 4, 3, 5, 6, 10}; code.adddoublearray("x", numbers); code.addrcode("my.mean<-mean(x)"); code.addrcode("my.var<-var(x)"); code.addrcode("my.all<-list(mean=my.mean, variance=my.var)"); caller.setrcode(code); caller.runandreturnresult("my.all"); double[] results = caller.getparser().getasdoublearray("mean");` system.out.println(results[0]);
this error message:
cat(makexml(obj=my.all, name="my.all"), file="c:/users/bob smith/appdata/local/temp/routput8089051805366000971") rcaller.exception.parseexception: can not handle r results due : rcaller.exception.parseexception: can not parse output: generated file c:\users\bob smith\appdata\local\temp\routput8089051805366000971 empty
i've tried several versions of rcaller (this example 2.2.0) , have received similar errors. know how fix this?
Comments
Post a Comment