Skip to content

Commit

Permalink
don't require survival package for check
Browse files Browse the repository at this point in the history
  • Loading branch information
mnwright committed Nov 10, 2023
1 parent 4795a99 commit 28be15b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/ranger.R
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ ranger <- function(formula = NULL, data = NULL, num.trees = 500, mtry = NULL,
}
data.selected <- parse.formula(formula, data, env = parent.frame())
dependent.variable.name <- all.vars(formula)[1]
if (survival::is.Surv(data.selected[, 1])) {
if (inherits(data.selected[, 1], "Surv")) {
status.variable.name <- all.vars(formula)[2]
}
y <- data.selected[, 1]
Expand Down

0 comments on commit 28be15b

Please sign in to comment.