Skip to content

Commit 474152f

Browse files
Merge pull request #1175 from tidymodels/add-missing-drop-false
add missing drop = FALSE
2 parents a9aadfb + e077fd6 commit 474152f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/predict.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ prepare_data <- function(object, new_data) {
452452
} else if (translate_from_xy_to_formula) {
453453
new_data <- .convert_xy_to_form_new(object$preproc, new_data)
454454
} else if (translate_from_xy_to_xy) {
455-
new_data <- new_data[, object$preproc$x_names]
455+
new_data <- new_data[, object$preproc$x_names, drop = FALSE]
456456
}
457457

458458
encodings <- get_encoding(class(object$spec)[1])

0 commit comments

Comments
 (0)