Tidymodels: Error in xgboost::xgb.DMatrix(data = newdata, missing = NA): 'data' has class 'character' and length 29241. #> 'data' accepts either a numeric matrix or a single filename.

The data that you are using contains factor columns and xgboost does not allow for non-numeric predictors (unlike almost every other tree-based model). There is some documentation here.

I suggest using a recipe for this. An easy way to do this is via the usemodels package (if you are unfamiliar with recipes).