Search code examples
javarperformanceintegrationrcaller

Calling R from Java - Faster alternative to RCaller


I tried RCaller 2.0 to call R functions from Java and I managed to make it work after a few tries. Integration was pretty easy but RCaller is kinda slow at runtime. I'm afraid that RCaller 2.0 won't be suitable for my application since I have to repeatedly call the same script thousands of times and the latency introduced by this library is unacceptable for my needs.

Is there a faster (in terms of run-time execution time) alternative for calling R scripts from Java?


Solution

  • Is there any way to push some of the iteration over into R, so that you're calling it much less often? Maybe you can pass in an array of data, with an array of scripts to run, where you're passing them in one by one now.