I\'ve build a model using caret. When the training was completed I got the following warning:
Warning message: In train.default(x, y, weights = w, ...) : A
As stated above the class values must be factors and must be valid names. Another way to insure this is,
levels(all.dat$target) <- make.names(levels(factor(all.dat$target)))