@@ -110,7 +110,7 @@ fit.model_spec <-
110110 ...
111111 ) {
112112 cl <- match.call(expand.dots = TRUE )
113- call_interface <-
113+ fit_interface <-
114114 check_interface(formula , recipe , x , y , data , cl )
115115 object $ engine <- engine
116116 object <- check_engine(object )
@@ -121,8 +121,10 @@ fit.model_spec <-
121121 # TODO Should probably just load the namespace
122122 load_libs(object , control $ verbosity < 2 )
123123
124+ fit_func <- paste(fit_interface , object $ method $ interface , sep = " _to_" )
125+
124126 res <- switch (
125- call_interface ,
127+ object $ method $ interface ,
126128 formula = , spark = fit_formula(
127129 object = object ,
128130 formula = cl $ formula ,
@@ -131,7 +133,7 @@ fit.model_spec <-
131133 ...
132134 ),
133135 recipe = fit_recipe(object , recipe , data , control = control , ... ),
134- xy = fit_xy(object , x , y , control = control , ... ),
136+ data.frame = , matrix = fit_xy(object , x , y , control = control , ... ),
135137 stop(" Wrong interface type" )
136138 )
137139
0 commit comments