I get this above error message when trying to create a variable importance plot for my cubist model in caret package. The importance ranking works fine for random forest with everything else being the same. So I don't know what is wrong with this one.
The code to create the Cubist model is
fit.cubist.32prdtrs.newdta1.minus_edu25<-train(y ~ x1+x2+x3...x20, data =df, method= "cubist", trControl = ctrl, importance =true)