Chuck Hooper, Senturus Tableau trainer and consultant and former head of Tableau’s consulting organization outlines what to do when you want to run R alongside Tableau on your notebook.
You want to learn R or at least play with it from inside Tableau.
Here’s how to implement the R statistical package on the same Windows (Win7Pro) machine as your Tableau Desktop installation.
- Open a web browser and go to: r-project.org
- Find where you select a CRAN Mirror. Click the link and select a site reasonably close to where you are located (this just means you’ll download the R installer from somewhere relatively close).
- After selecting the CRAN Mirror site, click the link to download the R installer for Windows. Save the download file to your local hard drive. After completing these first three steps, you are now done with the browser portion.
- Now, double click on the saved R installer to install the software (accept all defaults). You will end up with an “R” icon on your desktop. Double click to start the control screen.
- In the menu bar, select “Packages” -> “Set CRAN mirror.” Select a site near your location.
- Next, in the menu bar, select “Packages” -> “Install package(s)…” Select “Rserve” from the list, then click “OK” to install Rserve.
The next four steps are a one-time process to configure Tableau Desktop:
- Run Tableau Desktop.
- Click Help -> Settings and Performance -> Manage R Connection.
- Type in “local host“ for the Server name and 6311 for the Port. You may have to use 127.0.0.1 for the Server name.
- Click the “Test Connection” button to test the connection.
You should be clear to go! Before each use in Tableau, be sure to do the following:
- Run R by clicking on the R desktop icon.
- In the command window, enter library (Rserve) and hit return.
- In the command window, enter Rserve() and hit return.
You may also be interested in our webinar recording: A Pragmatic Approach to Sales Forecasting: Using Salesforce, ERP, Tableau & R.
Need additional Tableau Training? We offer regularly scheduled online beginning and advanced courses as well as onsite, custom training.
Chuck Hooper’s career includes over five decades of business and IT experience. He started Tableau’s Professional Services consulting organization and was a Tableau Zen Master from 2012-2014. He conducts training sessions on the use of Tableau Software products, and does speaking engagements on visual analytics, data warehouse design and other business intelligence topics at both the technical and the executive levels.