Using R in Processing through rJava/JRI?
Posted
by tommy-o-dell
on Stack Overflow
See other posts from Stack Overflow
or by tommy-o-dell
Published on 2010-02-28T02:28:02Z
Indexed on
2010/04/09
22:33 UTC
Read the original article
Hit count: 482
Hi guys,
Is it possible to run R in Processing through rJava/JRI? If I deployed a Processing app on the web, would the client need R on their system?
I'm looking to create an interactive information dashboard that I can deploy on the web. It seems that Processing is probably my best bet for the interactive/web part of things. Unfortunately, it doesn't look like there are many math/stats functions built-in. And there aren't any libraries for plotting data either.
I've been using R and gpplot2 for a few months and am thrilled (amazed) at how easily it manipulates and plots data.
So I'm wondering now if can get the best of both worlds and run R through a Processing applet.
From the JRI website:
JRI is a Java/R Interface, which allows to run R inside Java applications as a single thread. Basically it loads R dynamic library into Java and provides a Java API to R functionality. It supports both simple calls to R functions and a full running REPL.
In a sense JRI is the inverse of rJava and both can be combined (i.e. you can run R code inside JRI that calls back to the JVM via rJava). The JGR project makes the full use of both JRI and rJava to provide a full Java GUI for R.
JRI uses native code, but it supports all platforms where Sun's Java (or compatible) is available, including Windows, Mac OS X, Sun and Linux (both 32-bit and 64-bit).
Thanks for the advice :)
© Stack Overflow or respective owner