I get exactly that error message when running a minor modification of boosting
's first example:
> data(iris)
> iris.adaboost <- boosting(factor(Species)~., data=iris, boos=TRUE, mfinal=10)
Error in `[.data.frame`(data, , as.character(formula[[2]])) :
undefined columns selected
So you should try the advice I just gave in a comment (to do the factor()-ing beforehand). The formula interface to boosting
is not full featured enough to even handle the factor
function in its parse-tree.