# Add Table to R - R cannot be initialized. R Home is invalid

**URL:** <https://forum.knime.com/t/add-table-to-r-r-cannot-be-initialized-r-home-is-invalid/9851>\
**Category:** KNIME Extensions\
**Tags:** scripting\
**Created:** [May 29, 2017, 9:05am UTC](https://forum.knime.com/t/add-table-to-r-r-cannot-be-initialized-r-home-is-invalid/9851 "2017-05-29T09:05:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Vincenzo](https://forum-cdn.knime.com/user_avatar/forum.knime.com/vincenzo/32/575_2.png) [@Vincenzo](https://forum.knime.com/u/Vincenzo)\
**Post date:** [June 5, 2017, 4:16pm UTC](https://forum.knime.com/t/add-table-to-r-r-cannot-be-initialized-r-home-is-invalid/9851/2 "2017-06-05T16:16:23Z")

</div>

Hi 11atzitzi,

Please find below some useful information to connect R and KNIME.

In order for KNIME to run R commands on a local installation of R, it needs to know where the R installation&nbsp;is on the machine. The default path to the R installation&nbsp;is configured from the KNIME Preferences page (“File” -\> “Preferences”-\>“KNIME”-\> “R”. Then, you would need to&nbsp;click the “Browse” button and&nbsp;select the R&nbsp;installation directory.

Please, install also the following packages:

`install.packages('Rserve')`

`install.packages('Cairo')`

Hope that helps,

Best,

Vincenzo

---

_[View the full topic](https://forum.knime.com/t/add-table-to-r-r-cannot-be-initialized-r-home-is-invalid/9851)._
