[R] How can I call R from Java or C?
Henrik Bengtsson
hb at maths.lth.se
Thu Dec 11 10:52:38 CET 2003
Hi. Depending on what you are trying to do, you may also take a look
at Rserve
http://stats.math.uni-augsburg.de/Rserve/
>From the webpage: "Rserve is a TCP/IP server which allows other
programs to use facilities of R (see www.r-project.org) from various
languages without the need to initialize R or link against R library.
Every connection has a separate workspace and working directory.
Client-side implementations are available for popular languages such
as C/C++ and Java."
>From the Rserve FAQ: Supported Platforms: "Rserve should work on any
plarform supporting shared libraries which is also supported by R. The
following platforms were tested and are known to work with the latest
release: Linux (PPC, x86), Windows (x86), Mac OS X / Darwin (PPC), AIX
(PPC since version 0.1-10), SunOS (sun4u since version 0.2)"
I haven't used it myself so I do not know about the performance etc,
but it looks like it is easy to get started with.
Henrik Bengtsson
Lund University
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Aylin Yilmaz
> Sent: den 10 december 2003 23:48
> To: r-help at stat.math.ethz.ch
> Subject: [R] How can I call R from Java or C?
>
>
>
> Hi all,
> I am new to R. I have been looking for a way to call R
> functions from Java or C.
>
> What I have found so far is: I can execute R commands in
> batch mode from a file and redirect the output to another
> file. However, I am not sure this is the way to do it.
>
> About C, is it true that I can only call R from a C
> process,only if that C process is invoked within R itself? So
> is it R->C->R ?
>
> If I could call R from C, then I could possibly call C from
> Java using JNI (i am not sure exactly how well that will work)
>
> If you have any suggestions for R's interface that would be
> really nice.
>
> Thanks,
> ilene
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailma> n/listinfo/r-help
More information about the R-help
mailing list