randomForest package can help you to easily apply the very powerful (but computationally intensive) random forest classification technique.
If you have not already installed the
caret packages, install them now. Download the data files for this chapter from the book's website and place the
banknote-authentication.csv file in your R working directory. We will build a random forest model to predict
class based on the other variables.
To use Random Forest models for classification, follow these steps:
> library(randomForest) > library(caret)
> bn <- read.csv("banknote-authentication.csv") ...