Reputation: 314
I'm new to statistics, is there any way through which codes written in R statistics software be called from java library. I got some idea about JSC - "Java Statistical Class", but still not finding the way.
I found this under stackexchange: https://stats.stackexchange.com/questions/37466/open-source-java-library-for-statistics-at-the-level-offered-by-a-graduate-stati/60711#60711
Upvotes: 4
Views: 429
Reputation: 155
Probably rJava is the library you need.
The JRI component (formerly an independent project) lets you execute R functions from within Java. You'll have to translate your original R-code to your Java code using JRI's api, but that's reasonably straight-forward and the library performs fast.
You can install rJava from within R or on ubuntu as a package via apt.
I would be careful with the Java Statistical Classes. For me it calculated nonsense in some cases, so better cross-check the results with R should you decide to use that one.
Upvotes: 0