> cv.ctrl <- trainControl(method = \"repeatedcv\", repeats = 3, + summaryFunction = twoClassSummary, + classPro
If you changed the values in y to "YES" and "NO" instead of 1 and zero respectively, then the code will run.
y=ifelse(train.batch$y==0,"No","Yes")