Calling R from Java - A Faster Alternative to RCaller

I tried RCaller 2.0 call the R functions from Java, and I managed to get it to work after several attempts. The integration was pretty simple, but RCaller is a bit slower at runtime. I am afraid that RCaller 2.0 not suitable for my application, since I have to repeatedly call the same script thousands of times, and the latency introduced by this library is not acceptable for my needs.

Is there a faster (in terms of runtime) option for calling R-scripts from Java?

+4
source share
4 answers

Is there a way to move part of the iteration to R so that you call it much less often? Perhaps you can pass an array of data with an array of scripts to run, where you pass them one by one.

+1
source

Rcaller has many of the performance improvements that ship with version 2.1. Now it supports the transfer of commands to R in a loop using one process R. That is, after the initialization of system calls, there are no more.

+2
source

Look at the test file in the RCaller source tree: https://code.google.com/p/rcaller/source/browse/RCaller/src/test/java/rcaller/RunOnlineTest.java

This test file contains sequential commands that are executed on a single R-process. This method is called fast.

+2
source

Try Renjin , it seems pretty fast, at least!

0
source

All Articles