On 04/06/2009 10:09 AM, Martyn Plummer wrote:
Discussing with spot we thought that R_HOME should be set and that it
should be set within the main R package.
This is using the JRI interface to call the R engine from within java. If you want to do this then you should write a wrapper script that sets all the necessary environment variables, the class path and so on.
The rJava package contains two examples "rtest" and "rtest2", both of which are installed, along with a wrapper script called "run". These work perfectly for me:
So... where does it fail? I only added the R_HOME exports on the grounds that there was a legitimate need for them. If there is not, I'm willing to drop them. (I didn't want R-rJava to carry the shell scripts, because I thought that if one R module needed them, another would inevitably need them as well, then we'd have odd dependency chains on R-rJava.)
Of course, I still stand behind my point that R should unset all the environment variables that could cause it trouble before running its tests.
~spot