I used this code,
tuneRF(x = mtry[,c(4:18)],
y = mtry$Os, ntreeTry=50, stepFactor=2,
improve=0.05,trace=TRUE, plot=TRUE, doBest=FALSE)
And got the error:
Error in if (errorOld < 0) stop("Initial setting gave 0 error and no room for improvement.") :
argument is of length zero
What should I change?