tags:

views:

78

answers:

2

We are working on a complex statistical project on java. The original code we did it in R programming language http://en.wikipedia.org/wiki/R_%28programming_language%29 is there a way to convert this code in java code (converter) or otherwise how can we use R in a java project

A: 

I would give this a good look over this. Calling R From Java

Terrance
That is a more research-y and less production-ready solution. I strongly recommend to try rJava (suggested in the other answer) instead.
Dirk Eddelbuettel
+5  A: 

While I'm unaware of a 'converter', there is an interface called rJava which will allow you to run R code directly from Java.

http://www.rforge.net/rJava/

rJava is a simple R-to-Java interface. It is comparable to the .C/.Call C interface. rJava provides a low-level bridge between R and Java (via JNI). It allows to create objects, call methods and access fields of Java objects from R.

In a sense the inverse of rJava is JRI (Java/R Interface) which provides the opposite direction - calling R from Java. JRI is now shipped as a part of the rJava package, although it still can be used as a separate entity (especially for development). Currently rJava is used as a part of JGR, iPlots and JavaGD software/packages.

Seidr
Go with this one over the other reference from Omegahat.
Dirk Eddelbuettel