From lhansen at blackmesacapital.com  Mon Sep 15 18:52:10 2008
From: lhansen at blackmesacapital.com (Lars Hansen)
Date: Mon, 15 Sep 2008 10:52:10 -0600
Subject: [Rd] Using R from Java
In-Reply-To: <a7479ce00809140151r7ec62d74k91d003f194a32341@mail.gmail.com>
References: <a7479ce00809140151r7ec62d74k91d003f194a32341@mail.gmail.com>
Message-ID: <48CE92BA.3040003@blackmesacapital.com>

Hi,

Take a look at the rJava package. It includes JRI that lets you call R 
from Java. From the README:
> This package contains code that is necessary to run
> R as a single thread of a Java application. It provides
> callback that make it possible to run R in REPL mode
> thus giving the Java application full access to the
> console.
>
> Currently the API is very, very low-level, comparable
> to the C level interface to R. Convenience methods for
> mid to high-level are planned, but not implemented yet.
Good luck,
Lars

Marzio Sala wrote:
> Hello,
>
> I am interesting in using R from a web application, for basic statistics and
> plots. The server is Java-based (tomcat).
> The simplest solution is a system call that generates the text or the image,
> then the servlet forwards the output. This can be done from any language,
> but it is quite inelegant and slow for the initialization time.
>
> Is there any package or approach for accessing R from a Java servlet you can
> suggest?
>
> Thanks in advance for any suggestion.
>
> Regards,
> -Marzio
>
>



[Rd] Using R from Java
Lars Hansen