I\'ve trained a tree model with R caret. I\'m now trying to generate a confusion matrix and keep getting the following error:
Error in confusionMatrix
The length problem you're running into is probably due to the presence of NAs in the training set -- either drop the cases that are not complete, or impute so that you do not have missing values.