Setting up R for use in Knime is pretty easy, the biggest issue is usually forgetting to install the Rserve package, or not realising that you need additional tools to compile Rserve from Source as Knime suggests you do, chances are you are getting the error: ERROR: configuration failed for package ‘Rserve’ .
- First, you need to install R. Just head over to the CRAN repository and click download. When installing remember the install location
- You then need to install the install the Knime R Statisitics Integration packages, just open KNIME, goto help-> install new software. Select the analytics-platform repository and search for r stat and install. See the below image.
- Set up R in Knime, by going to file->preferences->knime->r and set the path, like in the image below
- Installing Rserve
This is the bit that that seems to trip most people. The issue is that there is no binary for Rserve, at least on Windows, so Knime gives you the following command to install the Rserve package:
install.packages('Rserve',,'http://rforge.net/',type='source')
What it doesn’t tell you is that on Windows you won’t be able to compile from source without Rtools install. Head over to the Rtools site (https://cran.r-project.org/bin/windows/Rtools/) and install. During the install process it might ask if you want to add the rtool binary to PATH, make sure that you say yes.
You are good to go! Here is a quick video of the process
0 Comments