Wednesday, March 9, 2011

Tips on installing R extension for Rapidminer on Mac OS X

Rapidminer is a cool toy to play with machine-learning/data-mining algorithms and it can interface with R. However, it was a bit problematic for me to get the R extension working properly on Mac OS X Leopard for R 2.11. Here is what works for me at the moment:

1) get rapidminer  (obviously :) )

2) install rJava and JavaGD in R through install.packages()
JavaGD is necessary so that Rapidminer R extension doesn't keep asking for a CRAN repository at the start up, also after installing JavaGD I was able to plot using R extension. Some people reported R tcltk package is also necessary. Maybe get that as well.

3) Set up the following lines at your ~/.bash_profile

export R_HOME=/Library/Frameworks/R.framework/Resources
export JAVA_HOME=/Library/Java/Home

I assume your R and Java installed in these locations.

4) At the first run of Rapidminer with R extension you will be asked to point the location of JRI dynamic-link library. Full path to mine is this:
/Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib

5) Run Rapidminer using "java -jar [RAPIDMINER_HOME]/lib/rapidminer.jar" on the terminal.
Clicking on rapidminer.jar starts the Rapidminer but then R extension doesn't work. So you have to run it through the terminal as shown above.

9 comments:

  1. Excellent pieces. Keep posting such kind of information on your blog. I really impressed by your blog.
    Vee Eee Technologies

    ReplyDelete
  2. Hi, Thanks for your tips, this helped me get most of the way to installing the R extension, I also ran into a cryptic fatal error: Content is not allowed in prolog

    For anyone running into this error please find the solution documented here:
    http://rapid-i.com/rapidforum/index.php/topic,4912.0.html

    ReplyDelete
  3. Thank you very much for clarifying the installation on OS/X. I have also bookmarked your blog. Cheers.

    ReplyDelete
  4. Thanks so much. I had the hardest time finding the library

    ReplyDelete
  5. THANKS - finally it works!!!

    ReplyDelete
  6. Replies
    1. details: http://stackoverflow.com/questions/20106117/r-extension-for-rapidminer-on-mac-os-x-mavericks-10-9-r-version-3-0-2-java-versi

      Delete
    2. was working before the mavericks update?

      Delete
    3. don't know. I installed it first on Maverick.

      Delete