Using R and Tableau

Using R and Tableau

Read this whitepaper to learn how R functions and R models can now be used in Tableau 8.1.
See preview.

What is R?

R is a popular statistical language used to perform sophisticated statistical analysis and predictive analytics, such as linear and nonlinear modeling, statistical tests, time-series analysis, classification, clustering, etc. The R-console primarily utilizes a command-line interface, but there are many GUI tools available for download to make it easier to write R programs (most of them are free). With R, users can create variables, formulas, functions, and graphs to visualize their analysis and predictions.

As a free, open-source language, there is a community of contributors who continually create new packages (extensions) for R that define advanced
statistical functions that were not originally built in to R. These packages can be downloaded into R to expand R’s capabilities. Most of these packages are also developed and made available for free. It is for this reason that R has become so popular and why it continues to gain functionality over time.

What are the benefits of using R?

R provides a powerful way to do statistical analysis on large sets of data. It is also free, which is a compelling factor to its growth. Because it is open source, new functions and packages are created all the time, so if you can’t find a capability initially, you can search for a package that can do it or even create a package of your own.

However, there are some limitations to R as well. In order to be as flexible as it is, R leverages a command-line interface and uses its own programming language and syntax. It does require some aptitude in coding to take advantage of the many functions. Other non-free, proprietary statistics packages often have graphical user interfaces that are much more friendly and do not require programming skills. These solutions are intended for those users who are not as apt to learn the R programming language, or do not need the sophisticated capabilities that are possible with R.

How is Tableau integrating with R?

R functions and models can now be used in Tableau by creating new calculated fields that dynamically invoke the R engine and pass values to R. The results are then returned back to Tableau for use by the Tableau visualization engine.

Who is this feature intended for?

This feature is primarily targeted for users who are already proficient at R. It is NOT meant for beginners with R. Anyone who wishes to use the new functions must first learn how to use R in order to leverage its capabilities in Tableau.

Users who are already proficient with R will find the integration beneficial for several reasons:

  • They will be able to do statistical analysis on their Tableau data.
  • They will be able to access any R package or function that has been installed in an R server which they can access.
  • They will be able to take advantage of all of the visualization capabilities in Tableau to further analyze and understand their data without having to manipulate their data in R (which can be cumbersome) for the same effect.

Pre-requisites for using the feature include:

  • Users must have proficiency with the R language to write the appropriate scripts and functional calls they require.
  • Users must have access to an R server to access R functions fromTableau Desktop or Tableau Server.

Want to read more? Download the rest of the whitepaper!