Java R Interface (Jri) Setup

Setting up Java R Interface (JRI) on Windows

How you instantiating Rengine?

It should be something like this:

Rengine rengine = new Rengine(args, false, null);

where, the args could be from your main method.

Let me know if this works!

Java/R Interface (JRI)

Use install.packages("rJava") in R - that will install rJava which includes JRI. You'll get the same effect by using R CMD INSTALL rJava_0.9-3.tar.gz. Both are the documented ways to install R packages. Make sure you have JDK installed and configured R with Java support before. Once installed, you can ask R about the location of JRI with system.file("jri",package="rJava")

Note that in order to use JRI you will need to setup the environment properly (typically using R CMD) and set java.library.path to include the JRI location. You may want to scan the stats-rosuda-devel mailing list which is the canonical place to ask about rJava/JRI.

Using R in Processing through rJava/JRI?

Can you write Java code (or access a Jar file) in Processing? If so, then you can absolutely do this. JRI provides a low level interface to R and I have yet to encounter something in R that couldn't be run through its functions.

See this related question for simple example of how to use it.

I haven't really used Processing other than to look at it a few times, but it was my understanding that it had its own language.



Related Topics



Leave a reply



Submit