@@ -207,12 +207,12 @@ check_fit_info <- function(fit_obj) {
207207 }
208208
209209 exp_interf <- c(" data.frame" , " formula" , " matrix" )
210- if (length(fit_obj $ interface ) > 1 ) {
210+ if (length(fit_obj $ interface ) != 1 ) {
211211 stop(" The `interface` element should have a single value of : " ,
212212 paste0(" `" , exp_interf , " `" , collapse = " , " ),
213213 call. = FALSE )
214214 }
215- if (! any( fit_obj $ interface == exp_interf ) ) {
215+ if (! fit_obj $ interface %in% exp_interf ) {
216216 stop(" The `interface` element should have a value of : " ,
217217 paste0(" `" , exp_interf , " `" , collapse = " , " ),
218218 call. = FALSE )
@@ -285,7 +285,7 @@ set_new_model <- function(model) {
285285 parsnip = character (0 ),
286286 original = character (0 ),
287287 func = list (),
288- has_submodel = rlang :: na_lgl
288+ has_submodel = logical ( 0 )
289289 )
290290 current [[paste0(model , " _fit" )]] <-
291291 dplyr :: tibble(
@@ -472,7 +472,7 @@ set_fit <- function(model, mode, eng, value) {
472472 dplyr :: filter(engine == eng & mode == !! mode ) %> %
473473 nrow()
474474 if (has_engine != 1 ) {
475- stop(" set_fit The combination of engine '" , eng , " ' and mode '" ,
475+ stop(" The combination of engine '" , eng , " ' and mode '" ,
476476 mode , " ' has not been registered for model '" ,
477477 model , " '. " , call. = FALSE )
478478 }
0 commit comments