title: Using R in Processing through rJava/JRI?
body: <p>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?</p>
  
  <p>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. </p>
  
  <p>I've been using R and gpplot2 for a few months and am thrilled (amazed) at how easily it manipulates and plots data. </p>
  
  <p>So I'm wondering now if can get the best of both worlds and run R through a Processing applet.</p>
  
  <p>From the <a href="http://rosuda.org/JRI/" rel="noreferrer">JRI</a> website:</p>
  
  <blockquote>
    <p>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.</p>
    
    <p>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.</p>
    
    <p>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).</p>
  </blockquote>
  
  <p>Thanks for the advice :)</p>