The reprex you provided runs just fine now, but on my dataframe I still get the following error:
x Fold01: model 1/25: Error: All of the models failed. An example message was:
Error in `[.data.frame`(m, labs) : undefined columns selected
It seems to have a problem with my column names but I can't think why that would be the case and only happen during tune, not when a single bag model is trained. Here are the column names:
[1] "HQ" "Facility_Type" "QUAL_SCORE_y0" "QUAL_SCORE_y1" "QUAL_SCORE_y2" "QUAL_SCORE_y3" "ERV_y0" "ERV_y1" "ERV_y2" "ERV_y3" "Rating_Method_y0" "Rating_Method_y1"
[13] "Rating_Method_y2" "Rating_Method_y3" "SUST_ACF" "SUST_RQMT" "PRORATED_SERVICE_PRV" "FSM_CALC_PRV" "Facility_Age_yrs" "sc_chg_1" "sc_chg_2" "all_score" "EVR_chg_0" "EVR_chg_1"
[25] "EVR_chg_2" "all_erv"