Connecting to R Server


I am trying to connect knime to an R Server that my company has. There are two main reasons for this:

  1. I want to be able to make the server do some of the heavy lifting and ETL
  2. I would ideally like to connect that to a Knime server in the future, but first need to check how to connect it to my local version.

I figure I need to point knime to the R Server, but I am unsure how to do that given that it is an enterprise instance of the R Server provided by R Studio.

Any help/direction is appreciated!


That is actually a pretty good question. What I found was that @stoeter wrote an entry about such a connection:

He references this page but mentioned it could be tricky:

And that was some time ago. From what I understand these components would be necessary:

  • Prepare the server with some sort of .sh script to accept commands for the command line (I might be wrong about that)
  • use the Rserve package (on the R Server) but tell it to accept remote connections like (–vanilla --RS-enable-remote)

These are just some quick ideas. Maybe someone from KNIME might know more. I have used R and KNIME from a local installation only.

1 Like

Hi Emilo,

If you want to use an R server and the Rserve package you can use the R nodes from the Scripting Integration community nodes for KNIME. However it could be that the enterprise R Server of R-Studio works differently and the connection via that Rserve package doesnt work.

Anyway, please follow the links of mlauber71 to set up the local R server, in brief:

  • install R/R-Studio and Scripting Integration nodes (Community nodes) in KNIME
  • install Rserve package (from R version 3.5 this is more complex that ealier versions, but it is explained if you follow the links…)
  • set in KNIME preferences (R-scripting the server to localhost)

The easiest way to check the connection is to use the R snipptet node with an input of a simple table and just execute without any further configuration/script. Then the table will be sent to the R server and comes back. It that works the connection is fine, and the rest is just R scripting…

Once the local R server works just change the R server name in the preferences to the remote (enterprise) R Server name or IP-adresss and check the connection. Maybe you need to verify the port!?

Good luck!