Home:ALL Converter>Java/R Interface (JRI)

Java/R Interface (JRI)

Ask Time:2012-03-01T07:56:22         Author:PNS

Json Formatter

I want to call some R code from within Java, on a Linux machine that has R installed already, so the Java/R Interface (JRI) is needed.

However, I am not sure how to go about this.

The JRI homepage says that the package is bundled in rJava. So, I downloaded rJava-0.9.3.tar.gz from the rJava Files section, and unzipped it, getting (among other things) a lot of Java source files (and their corresponding classes) in the src/java folder, plus 2 JARs (JRIEngine.jar and REngine.jar) in the inst/jri folder.

The JRI Files section, though, in addition to the above 2 JARs, also includes JRI.jar and all three of these libraries are more recent than the 2 in inst/jri.

In addition, none of these 3 JARs includes the binaries for the classes found in src/java, which appear to be necessary for calling R from within Java.

Running "make all" in the java/src folder seems to just execute some tests and no JAR is produced.

I would expect that all necessary classes come bundled in JAR files, so that they could be easily added in the classpath and in IDE projects (e.g., in Eclipse).

How can I get to that point?

Author:PNS,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/9508626/java-r-interface-jri
yy