Skip to content

Commit a7c3cb7

Browse files
committed
apply same conversions to new data as when fitting
1 parent 93b4fd3 commit a7c3cb7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

R/predict.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,12 @@ prepare_data <- function(object, new_data) {
229229
new_data <- convert_form_to_xy_new(object$preproc, new_data)$x
230230
}
231231
}
232-
233-
new_data
232+
switch(
233+
fit_interface,
234+
none = new_data,
235+
data.frame = as.data.frame(new_data),
236+
matrix = as.matrix(new_data),
237+
new_data
238+
)
234239
}
235240

0 commit comments

Comments
 (0)