Using R in Tableau

Requirements:

Tableau Professional Edition
R Studio or R Console

Setting Up Tableau Desktop with R:

Install following packages in R:
install.packages(RServe)

Once it is installed then start R Server by entering following command in the console:
> library(RServe)
> RServe()

Configuring Rserve Connection:

In Tableau go to following menu setting: Help -> Settings and Performance -> Manage External Service Connection
Enter or select a server name using a domain or an IP address. On a personal laptop or computer, you can enter localhost. The drop-down list includes localhost and the server you most recently connected to.

Specify a port. Port 6311 is the default port for Rserve servers.
If the server requires credentials, specify a Username and Password.

Tableau and R Integration final output of an linear regression model Tableau and R Integration final output of an linear regression model

Click Test Connection.
Click OK.

Executing R Script from Tableau:

Create a new calculated field and name it as Coefficient, which will calculate the coefficient for the linear regression model.Tableau and R Integration final output of an linear regression model Then drag and drop your calculated variable to play around with visualisations.

 

 

 

 

Tableau and R Integration final output of a linear regression model
Tableau and R Integration final output of a linear regression model

To  learn more visit: Tableau

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.