> out <- train(lisbon_train, 'Price', verbose = FALSE, bayes_iter = 0, random_evals = 1)
# here, lisbon_new does not have the "Price":
> preds <- predict_new(out, lisbon_new)
Error in `[.data.frame`(xgboost_data, , y) : undefined columns selected
> traceback()
5: stop("undefined columns selected")
4: `[.data.frame`(xgboost_data, , y)
3: xgboost_data[, y]
2: prepare_data(data, type = type, y = y, engine = engine, predict = TRUE,
train = train_data)
1: predict_new(out, lisbon_new)