Skip to content

Commit

Permalink
remove now-redundant class check
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Feb 12, 2024
1 parent 0ef5503 commit 9ceac0d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions R/fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,8 @@ check_xy_interface <- function(x, y, cl, model) {
inher(x, c("data.frame", "matrix"), cl)
}

# `y` can be a vector (which is not a class), or a factor or
# Surv object (which are not vectors)
if (!is.null(y) && !is.atomic(y))
inher(y, c("data.frame", "matrix", "factor", "Surv"), cl)
inher(y, c("data.frame", "matrix"), cl)

# rule out spark data sets that don't use the formula interface
if (inherits(x, "tbl_spark") | inherits(y, "tbl_spark"))
Expand Down

0 comments on commit 9ceac0d

Please sign in to comment.