Skip to content

Commit

Permalink
better support for non-standard x/y interface arg names
Browse files Browse the repository at this point in the history
  • Loading branch information
topepo committed Apr 7, 2020
1 parent 6e8323c commit 0ddb2cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/fit_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ xy_xy <- function(object, env, control, target = "none", ...) {
# sub in arguments to actual syntax for corresponding engine
object <- translate(object, engine = object$engine)

object$method$fit$args[["y"]] <- quote(y)
object$method$fit$args[["x"]] <-
object$method$fit$args[[ object$method$fit$protect[2]] ] <- quote(y)
object$method$fit$args[[ object$method$fit$protect[1]] ] <-
switch(
target,
none = quote(x),
Expand Down

0 comments on commit 0ddb2cd

Please sign in to comment.