- Processing.R mode is installed in PDE.
- The R mode includes a resource ( renjin-script-engine.jar / renjin-script-engine-0.8.2413-jar-with-dependencies.jar)
- This could be used to run R in a Java mode sketch.
I want to write an example sketch in Java mode demonstrating how to import resources from Processing.R mode and use them to integrate an R process into a Java mode sketch. The Java sketch would include a line like this:
However this does not work because the jars of Processing.R mode are not in the Java mode path.
Is there a workaround?
Partial solutions I can think of:
- include renjin-script-engine.jar again in the RinJava.pde example sketch path. However this needs to be copied to every new sketch -- and the user already had this jar installed in their system in the Processing.R mode!
- write a separate library for PDE Contributions Manager called "RinJava" that includes renjin-script-engine.jar, and have users install the library and import it to a Java sketch. This is better, but it still requires two installs of the same jar, and it doesn't allow the Java crossover example to be distributed directly with the R mode.
- use dark magic to place renjin-script-engine.jar directly in the existing Java mode, perhaps during Processing.R install. This seems like a bad idea, because (among other potential problems) any update to Processing(Java mode) could remove the change.
Ideally there would be a way to access Processing.R mode jars from a Java mode sketch -- then if the R mode is installed, a Java sketch could also use it.