Skip to content

Commit 0ddb2cd

Browse files
committed
better support for non-standard x/y interface arg names
1 parent 6e8323c commit 0ddb2cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/fit_helpers.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ xy_xy <- function(object, env, control, target = "none", ...) {
8989
# sub in arguments to actual syntax for corresponding engine
9090
object <- translate(object, engine = object$engine)
9191

92-
object$method$fit$args[["y"]] <- quote(y)
93-
object$method$fit$args[["x"]] <-
92+
object$method$fit$args[[ object$method$fit$protect[2]] ] <- quote(y)
93+
object$method$fit$args[[ object$method$fit$protect[1]] ] <-
9494
switch(
9595
target,
9696
none = quote(x),

0 commit comments

Comments
 (0)