Using R in processing via rJava / JRI?

Is it possible to run R in processing via rJava / JRI? If I deployed the Processing application on the Internet, does client R need on their system?

I am looking to create an interactive dashboard that I can deploy on the Internet. It seems that processing is probably my best bet for the interactive / web part of things. Unfortunately, it seems that there are no built-in math and statistics functions. And there are no libraries for printing data.

I have been using R and gpplot2 for several months, and I am excited (surprised) at how easily it manipulates and processes data.

So now I'm wondering if it is possible to get the best of both worlds and run R through the processing applet.

On the JRI website :

JRI is a Java / R interface that allows you to run R inside Java applications as a single thread. It basically loads the R dynamic library in Java and provides the Java API for R functionality. It supports how simple calls R functions and full run REPL.

In a sense, the JRI is the reverse of rJava and both can be combined (i.e. you can run the R code inside the JRI, which will call back to the JVM via rJava). The JGR project makes full use of both JRI and rJava to provide a complete Java graphical interface for R.

JRI uses native code, but it supports on all platforms where Sun Java (or compatible), including Windows, Mac OS X, Sun and Linux (both 32-bit and 64-bit).

Thanks for the advice:)

+5
3

Java ( Jar) ? , . JRI R, - R, .

. , .

Processing, , , .

+2

Another option is to use Incanter for Clojure. This is an R-like library in Clojure, pretty fast because of the pure java library of Parallel Colt with built-in JFreeChart support for quick charting, as well as a wrapper for using processing through Clojure.

You can simply click the resulting application on the Internet as a regular (albeit probably quite large) Java applet.

0
source

All Articles