How do I get started with Tableau and R?
For users who are already familiar with R and its capabilities, it is easy to establish a connection between R and Tableau. The following instructions apply to a new installation based on the open source version of R. Other scenarios may also use other packages, such as packages from Revolution Analytics.
Download and install R. Click here to find files and instructions for downloading R.
Download and install Rserve. In order to use the new script function, you need to install a rserve to connect
Tableau. Enter the following command in the R console:
Install.packages ("Rserve")
Library (Rserve)
Rserve ()
Connect Tableau to the R server. After installing Rserve, open Tableau Desktop and follow these steps:
Go to the Help menu and select Manage R connections.
Enter the "Localhost" (or "127.0.0.1") server name and Port "6311".
Click the Test Connection button to make sure everything is working. You should see a success message. Click OK to close.
4. Start using the R script in Tableau. You can now create new calculated fields in Tableau Desktop that perform R function calls with the script_* function .
Tableau Connect R language