0

I'm trying an example in eclipse running on windows 8, JRE 7, RCaller 2.4 and R-3.0.2. I also ried R-3.1.1. But when the plot is generated it appears empty, and it shows no exceptions or errors. When I looked up the generated plot it has a size of 0 kb.

I tried the same code on my mac-os and everything was perfect as it should...

Code:

  RCaller caller = new RCaller();
  caller.setRscriptExecutable("C:\\Programme\\R\\R-3.0.2\\bin\\Rscript.exe");

  RCode code = new RCode();
  code.clear();

  // double[] numbers = new double[]{1, 4, 3, 5, 6, 10};
  //
  // code.addDoubleArray("x", numbers);
  File file;
  file = code.startPlot();
  System.out.println("Plot will be saved to : " + file);
  code.addRCode("x<-c(1,4,3,5,6,10)");
  code.addRCode("plot(x)");
  code.endPlot();

  caller.setRCode(code);
  caller.runOnly();
  code.showPlot(file);
slowessam
  • 115
  • 1
  • 3
  • 10

1 Answers1

2

Make sure you are using RCaller-2.0.7.jar or version greater than this.

Reference rcaller-calling-r-from-java

Pankaj Shinde
  • 3,361
  • 2
  • 35
  • 44