(1) TERR does not have a built-in Random Forest Classification capability, but the user-contributed "randomForest" package can be installed in TERR from the open-source R community's CRAN repository.
In a TERR session on a Windows PC that has internet access to the CRAN repository, the following sequence of commands will install the "randomForest" package, then load the package into the TERR session's search() path:
install.packages( "randomForest" )
library( randomForest )
The following URLs will display the CRAN page for this package and its PDF reference manual:
https://cran.r-project.org/web/packages/randomForest/index.html
https://cran.r-project.org/web/packages/randomForest/randomForest.pdf
(2) By design, R graphics (such as the plot() function and its many class-specific methods) have not been implemented in TERR.
But the RGraph() function in TERR's built-in "RinR" package provides a way for a Spotfire data function's TERR script to generate an R graph in open-source R, then return the resulting image to Spotfire for display as a static graph in a label or a cell in a data-table column. The example in the following public knowledge base article demonstrates one way to do this:
https://support.tibco.com/s/article/Example-TERR-RinR-RGraph-data-functi...