Re: [R] Use R in Java

From: Rajarshi Guha <rguha_at_indiana.edu>
Date: Wed 02 Aug 2006 - 06:00:01 EST

On Wed, 2006-08-02 at 03:44 +0800, TAN Chong Hui wrote:
> Hi
>
> I'm trying to use R from Java.
> There doesn't seem to be much documentation on this.
> I installed JGR that has JRI and Rjava coming with it.
>
> According to the short description at www.rosuda.org/JRI/,
> there's supposed to be an "examples" directory in JRI.
> I don't seem to be able to find that.
>
> I tried to install JRI on its own (not with JGR) from rosuda.
> But there seems to be some error with the zip-file.
>
> Help, anybody?

I don't know how it'd work on Windows (though I suppose it should be similar) but on Linux, you basically need to

Also if you only want to use R from Java (and don't need Java from R) then you should not need Rjava at all. The JRI source's should be sufficient.

The CDK uses JRI to use R as a backend and you can take a look at the code that we use to interact with R. On example can be seen at

http://svn.sourceforge.net/viewvc/cdk/trunk/cdk/src/org/openscience/cdk/qsar/model/R2/RModel.java?view=markup



Rajarshi Guha <rguha@indiana.edu>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE

Q: What's purple and commutes?
A: An abelian grape.

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed Aug 02 07:16:27 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 02 Aug 2006 - 08:20:41 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.