Tableau Tip: Running R Alongside Tableau

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.

Scenario:

You want to learn R or at least play with it from inside Tableau.

Solution:

Here’s how to implement the R statistical package on the same Windows (Win7Pro) machine as your Tableau Desktop installation.

  1. Open a web browser and go to: r-project.org
  2. 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).
  3. 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.
  4. 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.
  5. In the menu bar, select “Packages” -> “Set CRAN mirror.” Select a site near your location.
  6. 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:

  1. Run Tableau Desktop.
  2. Click Help -> Settings and Performance -> Manage R Connection.
  3. 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.
  4. 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.

Senturus Upcoming Events

You may also be interested in our on-demand webinar: A Pragmatic Approach to Sales Forecasting: Using Salesforce, ERP, Tableau & R.

Need additional Tableau Training? We offer beginning and advanced instructor-led online courses as well as self-paced, onsite and 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.

Connect with Senturus

Sign up to be notified about our upcoming events

Back to top