Calling R code from a java library?

I am new to statistics, is there a way by which code written in the R software is called in the java library. I got some idea about AO - "Statistical Java class", but still haven't found a way.

I found this on stackexchange: https://stats.stackexchange.com/questions/37466/open-source-java-library-for-statistics-at-the-level-offered-by-a-graduate-stati/60711# 60711

+4
source share
2 answers

You can use RCaller. I am working on it at the moment, and some things work, some do not, but it is worth a try.

+2
source

RJava is probably the library you need.

The JRI component (a previously independent project) allows you to execute R functions from Java. You will need to translate the source R code to your Java code using the JRI api, but it is quite simple and the library is fast.

You can install rJava from R or on ubuntu as a package using apt.

I would be careful with Java aggregate classes. For me, he calculated stupidity in some cases, so it’s better to double-check the results with R if you decide to use it.

0
source

Source: https://habr.com/ru/post/1484146/


All Articles