Skip to content

randomForest Error passing string argument

1 message · Liaw, Andy

#
If all you need the formula interface for is auto deletion of NAs, I'd
suggest doing something like:


varlist <- c("fruit", "apples", "oranges", "blueberries")
fruits.nona <- na.omit(fruits.data[varlist])
model.rf <- randomForest(fruits.data[-1], fruits.data[[1]], ...)

If you want to know the call that produced model.rf, you can look at
model.rf$Call.

I hope that sort of answers your question.

Andy