"R on RapidAnalytics"

ScottOliveiraScottOliveira Member Posts: 1 Contributor I
edited June 2019 in Help
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?

Scott Oliveira


  • Options
    Nils_WoehlerNils_Woehler Member Posts: 463 Maven
    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.

  • Options
    awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn

    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 :)

  • Options
    JohnJohn Member Posts: 1 Contributor I
    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?
  • Options
    awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn
    ooh ooh - I'm going to try this - thanks John
  • Options
    swapniladswapnilad Member Posts: 2 Contributor I
    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,
    and set it to

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

  • Options
    awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn
    On an Ubuntu machine I found the setting for


    should be something like this


    to work.

  • Options
    manufc09manufc09 Member Posts: 2 Contributor I
    Information is very useful, it can be used for good.
Sign In or Register to comment.