- Joined
- 9/9/08
- Messages
- 271
- Points
- 38
Does anyone have any experience running R from Java in eclipse?
I'm running Indigo and R v2.9.0 - I have limited options here, unfortunately.
I was able to get JRI/rJava up and running and R and Java communicating with one another with a slight hack by replacing R.dll in both bin and rjava/JRI with v.2.11.0.
The one problem that I'm running into is that the R libraries are not working properly.
I can pass through vectors or expressions without issue and can perform basic operations - anything in the base package anyhow. If I try to use any of the built in statistical functions (cor, for instance) I get an expression not found error.
I've tried setting forcing library(stats), but I get an error that the package does not contain the proper structure. I've also tried setting R_LIBS and R_LIBS_USER explicitly in the run configuration, it doesnt seem to make any difference.
When I call .libpaths it returns the same F:/R2.9.0/R/Library though there is no F:\ on my computer - I suspect that JRI is renaming my C:\ path to F:\ (?)
If I run R directly (with the old v2.9.0 R.dll) the stats functions run just fine.
Any thoughts on this? Its driving me nuts
Will need to run a few hundred (thousand?) iteration variations. Any idea what the speed is like? Would I be better off writing a batch file to pass csv's between the two?
There seems to be limited documentation about this and it is, or course, rather difficult to find relevant information on 'r' or 'rJava' search terms on the interwebs.
I'm running Indigo and R v2.9.0 - I have limited options here, unfortunately.
I was able to get JRI/rJava up and running and R and Java communicating with one another with a slight hack by replacing R.dll in both bin and rjava/JRI with v.2.11.0.
The one problem that I'm running into is that the R libraries are not working properly.
I can pass through vectors or expressions without issue and can perform basic operations - anything in the base package anyhow. If I try to use any of the built in statistical functions (cor, for instance) I get an expression not found error.
I've tried setting forcing library(stats), but I get an error that the package does not contain the proper structure. I've also tried setting R_LIBS and R_LIBS_USER explicitly in the run configuration, it doesnt seem to make any difference.
When I call .libpaths it returns the same F:/R2.9.0/R/Library though there is no F:\ on my computer - I suspect that JRI is renaming my C:\ path to F:\ (?)
If I run R directly (with the old v2.9.0 R.dll) the stats functions run just fine.
Any thoughts on this? Its driving me nuts

Will need to run a few hundred (thousand?) iteration variations. Any idea what the speed is like? Would I be better off writing a batch file to pass csv's between the two?
There seems to be limited documentation about this and it is, or course, rather difficult to find relevant information on 'r' or 'rJava' search terms on the interwebs.