Pages: [1]
  Print  
Author Topic: R on RapidAnalytics  (Read 3669 times)
ScottOliveira
Newbie
*
Posts: 1


« on: November 19, 2012, 05:38:55 PM »

I'm having trouble configuring R on RapidAnalytics.
 I've copied over the R expansion and the web console shows the operators are being installed.

I've got R 2.15.1 x64 installed, and Java 1.6.x on my server. 

I have Rapid Miner installed on my personal computer with the same versions of R and Java, and have gotten the local R extension to work.  I've set environment variables similarly across both systems (PATH, JAVA_HOME, R_HOME).

Whenever a R process is run on RapidAnalytics tries to run, I get a

 'com.rapidminer.operator.OperatorException: Could not initiate session with native R. Try using server. Reason: Could not initialize R via JRI. Reason: Library wasn't loaded.'

 error.  So I'm guessing that the problem is that RapidAnalytics is trying to run from the wrong JRI (I've seen posts about similar issues with RM).  However I can't find a way to manually set the R JRI to use in RapidAnalytics, as can be done in RapidMiner.

Is there a way to manually configure the R extension for RapidAnalytics, or a procedure to install extension correctly on RapidAnalytics?

Thanks,
Scott Oliveira
Logged
Nils
Administrator
Sr. Member
*****
Posts: 412


« Reply #1 on: November 20, 2012, 05:56:48 PM »

Hi Scott,

currently it is not easily possible to install R on RapidAnalytics. But we are working on improving the R extension installer and also will take care of this issue.

Best,
Nils
Logged

Please add [SOLVED] to the topic title when your problem has been solved! (do so by editing the first post in the thread and modifying the title)
awchisholm
Sr. Member
****
Posts: 390


WWW
« Reply #2 on: November 28, 2012, 12:22:27 AM »

Hello

Do you have an estimate of when the R installer might be available to resolve this? If it's a few days then that would be most cool. If it's longer then I might try and work out how to do it manually. Do you have any high level instructions that could help?

hopefully Smiley

Andrew
Logged

John
Newbie
*
Posts: 1


« Reply #3 on: April 08, 2013, 11:43:06 AM »

Heres how I did it on windows 7 64 bit using rapidminer 5.2 and r extension 5.3, R 2.15.2 on RapidAnalytics1.2.008. There may be a better way, but it works. Just needed to change 1 line of code in the R extension package.

1. Make sure you have rapidminer installed and the r extension working ok.

2. Get the R extension source code. Change 'new File("jri")' to 'new File("jri.dll")' in Rengine.java thus

    public static void loadLibrary() throws UnsatisfiedLinkError, SecurityException {
        //loadLibrary(new File("jri"));       // this doesn't work
        loadLibrary(new File("jri.dll"));    // added .dll to jri seems to do the trick
    }

Recompile, drop the new jar in to RapidAnalytics1.2.008\plugins  (or your plugin dir if different)

3. Put the jri.dll from R-2.15.2\library\rJava\jri\x64 (or 32 if thats your architecture) in RapidAnalytics1.2.008\bin

Thats it. It seems to prevent closing rapidanalytics down with ctrl-c in the cmd window, not sure if that will have any side effects?
Logged
awchisholm
Sr. Member
****
Posts: 390


WWW
« Reply #4 on: April 16, 2013, 09:55:23 PM »

ooh ooh - I'm going to try this - thanks John
Logged

swapnilad
Newbie
*
Posts: 4


« Reply #5 on: October 09, 2013, 05:04:52 AM »

Hi,
somehow..this solution did not work for me.

I found a solution to this which will work without recompile of the java file.

In Rapidanalytics, go to System settings and add user property,
rapidminer.r.native_lib
and set it to
jri.dll

This will load the jri.dll file from \bin folder of rapidanalytics where you have put it, at plugin registration time itself.

Logged
awchisholm
Sr. Member
****
Posts: 390


WWW
« Reply #6 on: October 19, 2013, 10:48:05 PM »

On an Ubuntu machine I found the setting for

rapidminer.r.native_lib

should be something like this

/usr/local/lib/R/site-library/rJava/jri/libjri.so

to work.

Andrew
Logged

manufc09
Newbie
*
Posts: 2


« Reply #7 on: November 11, 2013, 06:22:58 AM »

Information is very useful, it can be used for good.
Logged

Pages: [1]
  Print  
 
Jump to: