- Launch R, open a new script and type install.packages("rpart", repos='http://cran.us.r-project.org').
- Select the text, and click on
or press Ctrl + R.
- When the installation process is completed, load the package by typing the following line:
library(rpart)
- Select the text, and click on
or press Ctrl + R.
- In Tableau, in the main menu toolbar, click on Analysis and then click on Create Calculated Field....
- Rename the field from Calculation 1 to Random Forest and type the following expression into the formula space:
SCRIPT_REAL('library(rpart); ...