R from java with no graphics: is it worth moving to JRI
Posted
by LH
on Stack Overflow
See other posts from Stack Overflow
or by LH
Published on 2010-03-26T19:53:16Z
Indexed on
2010/03/26
20:43 UTC
Read the original article
Hit count: 156
I have a system set up that's been happily running R from a java servlet, spawning processed & hooking into the process's stdin, stdout, and stderr streams, as in the second andwer to this question.
After a system upgrade (that included glibc), the input is no longer reaching the R process.*
Until now, 'R --vanilla --slave -f [file] ...' was working fine for me. I also have no swing dependencies right now, so I'm somewhat reluctant to add them. (I may actually not be able to add swing dependencies; am I right that using REngine automatically brings swing in? The examples import all of swing.)
Are there advantages to switching to JRI? What changes would I need to make to my R script? (It currently reads from stdin and writes to stdout). I'm not finding the provided examples terribly helpful for how to use JRI in this situation.
Thanks for your help & comments.
*I can't even tell if the problem is data being written too soon or too late, but that's a separate issue/question; if I move to JRI I'm hoping it all becomes moot.
© Stack Overflow or respective owner