We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5dd6fec commit bb5e98eCopy full SHA for bb5e98e
R/predict.R
@@ -245,7 +245,7 @@ prepare_data <- function(object, new_data) {
245
dplyr::filter(mode == object$spec$mode, engine == object$spec$engine) %>%
246
dplyr::pull(remove_intercept)
247
if (remove_intercept) {
248
- new_data <- new_data[, colnames(new_data) != "(Intercept)", drop = FALSE]
+ new_data <- new_data %>% dplyr::select(-dplyr::one_of("(Intercept)"))
249
}
250
251
switch(
0 commit comments