There are two ways one can write the code to train a random forest model in R.
Both the ways are listed below.
A normal and frequent way of writing the command to train the random forest model is something like this.
rfModel <- randomForest(Survived~. , data = trainSample[, -c(6, 8 ...