Skip to content

R Integration

If your KNIME workflow uses nodes from the KNIME Interactive R Statistics Integration extension, you need to install R into your environment. Runner does not include R by default — it must be added via a Dockerfile instruction.

Installing R

  1. Open the environment and go to Additional Dockerfile Instructions.

  2. Add the following snippet. It installs r-base and Rserve — the package that lets KNIME communicate with R:

    dockerfile
    RUN apt-get update \
      && DEBIAN_FRONTEND=noninteractive apt-get install -yq r-base \
      && rm -rf /var/lib/apt/lists/* \
      && R -e "install.packages('Rserve',,'http://rforge.net/',type='source')"

    R will be available at /usr/lib/R and is discovered automatically by the KNIME Interactive R Statistics nodes.

  3. Save the environment. Runner rebuilds the Docker image on the next run.

See Environments for the full list of available settings.

Adding R packages

To install additional R packages, extend the RUN command:

dockerfile
RUN apt-get update \
  && DEBIAN_FRONTEND=noninteractive apt-get install -yq r-base \
  && rm -rf /var/lib/apt/lists/* \
  && R -e "install.packages(c('Rserve', 'ggplot2', 'dplyr'),,'http://rforge.net/',type='source')"