R from within Java

前端 未结 5 446
梦如初夏
梦如初夏 2020-12-01 04:04

What\'s the best way to call R functionality from within Java?

I\'m looking for a quick, easy and reliable way to make standard 2d scatter plots and histograms in R

5条回答
  •  眼角桃花
    2020-12-01 04:18

    I have found that forking R as a process, attaching to the process's stdin, stdout, and stderr streams, and sending R commands via the input stream to be quite effective. I use the filesystem to communicate between R and my Java process. This way, I can have multiple R processes running from different threads in Java and their environments do not conflict with each other.

提交回复
热议问题