Re: [Fedora-r-devel-list] R-java and R-java-devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2009-04-04 at 19:44 +0200, Pierre-Yves wrote:
> On Fri, 2009-04-03 at 19:03 +0200, Martyn Plummer wrote:
> > On Fri, 2009-04-03 at 09:31 -0400, Tom "spot" Callaway wrote:
> > > On 04/03/2009 03:31 AM, Martyn Plummer wrote:
> > > > On Tue, 2009-03-24 at 08:48 -0400, Tom "spot" Callaway wrote:
> > > >> On 03/24/2009 05:30 AM, Pierre-Yves wrote:
> > > >>> I can also include it in R-rJava to make user's life easier :)
> > > >> R_HOME should always be determined by asking R (R RHOME), so this isn't
> > > >> necessary.
> 
> > > > I see that you put this in. But it breaks the testing suite in the
> > > > current development version. Can we go back over this decision to see
> > > > what the original problem was?
> > > 
> > > Pierre is maintaining an R module (rJava, I think if memory serves),
> > > where it refuses to build/function unless R_HOME is set properly. He
> > > should be able to provide more specifics.
> > 
> > Both the CRAN version of the rJava package, and the latest snapshot from
> > rforge build correctly without having R_HOME set.  This must be
> > something that happens inside R2spec. I've found Pierre's blog post
> > where he talks about the problem and will take a look.
> 
> The problem does not come from the build itself.
> I managed to build rJava correctly with the change made by spot, the
> problem of R_HOME comes when you try to run a R session within Java.
> I first met the error I reported in my blog is fixed by moving the file
> libjri.so to /usr/lib(64)/, so the RPM now handle it by himself.
> But after this problem Java is asking for the R_HOME to be set in the
> environment variable (I found the piece of the code that handles this
> part, but I don't have it here with me).
> 
> Discussing with spot we thought that R_HOME should be set and that it
> should be set within the main R package.

This is using the JRI interface to call the R engine from within java.
If you want to do this then you should write a wrapper script that sets
all the necessary environment variables, the class path and so on.

The rJava package contains two examples "rtest" and "rtest2", both of
which are installed, along with a wrapper script called "run". These
work perfectly for me:

[martyn@seurat ~]$ cd /usr/lib64/R/library/rJava/jri/
[martyn@seurat jri]$ ./run rtest
...
[martyn@seurat jri]$./run rtest2
...

A more extensive example is the JGR package which provides a Java GUI
for R. The GUI can be launched from the shell by running a wrapper
script - again called "run" - which is installed with the JGR package.
This script also works perfectly for me. 

This is not a reason to set R_HOME globally,

Martyn

> I hope that help to understand the problem,
> 
> Best regards,
> 
> Pierre


-----------------------------------------------------------------------
This message and its attachments are strictly confidential. If you are
not the intended recipient of this message, please immediately notify 
the sender and delete it. Since its integrity cannot be guaranteed, 
its content cannot involve the sender's responsibility. Any misuse, 
any disclosure or publication of its content, either whole or partial, 
is prohibited, exception made of formally approved use
-----------------------------------------------------------------------

_______________________________________________
Fedora-r-devel-list mailing list
Fedora-r-devel-list@xxxxxxxxxx
http://www.redhat.com/mailman/listinfo/fedora-r-devel-list

[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux