R and knime configuration on OSX


I am trying to run an R script on Knime. 

When I open the R node on knime I receive this message on the console: 

R cannot be initialized.
Exception occured during R initialization.

I think I have done everything correctly so I do not understand why I am getting this error. Maybe it is due to the use of a wrong R plugin??


Hi donbeo,

you need to have the Rserve package installed in R, aswell as the Cairo package if you are on Mac. There could possibly be some more information on the error earlier in the console, depending on the error.

Hope that helps.

Regards, Jonathan.

Note that there's a difference between the "R" nodes in /Scripting/R and the "R Scripting" nodes in /Community Nodes/R Scripting.

In case other users trying to enable R in KNIME might find this useful, here's what worked for me:

  • Install R-3.4.2 from https://cran.r-project.org/bin/macosx/
  • In the KNIME preferences, under KNIME > R (not KNIME > R Scripting), set the path to R Home:
    <p>(After installing the R.app, it&#39;s not obvious where the <em>./bin</em> directory is actually located, but the path above should reflect the default installtion)</p>
    <p>In the R.app running, install the packages Rserve and Cairo:</p>
    <pre class="brush:diff;">