Random Forest command in R for selected variables
You have to do 

RF &lt;- randomForest(sale ~ v1 + v2 + v3, data = TrainSet, importance = TRUE)

this is the formula notation for R. It doesn't make a lot of sense for random forest models, but it is how it works.