
Install, Setup and Connection:
Install in R:
There are multiple ways to install package in R, personally I use the following


Setup in R:
Once installed, we can start the connection in R console by running the following code
library(RServe) (then) Rserve()
OR
RServe::Rserve()
then we can just leave there and head to Tableau.
Connect in Tableau:
Either in the data source view or worksheet view, go to the toolbar

Select R

Feel free to Test Connection, this should finish setup the connection to R and ready to be used.
Make sure always start RServe first in R, before attempt to call SCRIPT_* function in Tableau.
Comment:
R has a lot package to support many much more advanced calculations, but the GUI in Tableau is not the kindest. By type the code within " ", there is no way of coding mistakes or even spellings, which will make it almost impossible to setup complicated code chunks.
For full set of statistical analysis, it is probably better to perform within R, then output the relevant results to Tableau for visualizations. RShiny is developing, but it is nowhere close to Tableau in building an interactive dashboard.
And R is built for doing statistics, anything to do with server or database will probably be more complicated to do so than Tableau Server.
Looking forward to see Tableau's integration with Einstein Discovery.
Keep following the blog for future updates.