From 28be15b16ec00f9af169d170bbbceab35f36928b Mon Sep 17 00:00:00 2001 From: Marvin Wright Date: Fri, 10 Nov 2023 19:33:53 +0100 Subject: [PATCH] don't require survival package for check --- R/ranger.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/ranger.R b/R/ranger.R index 660c82d5..c33da627 100644 --- a/R/ranger.R +++ b/R/ranger.R @@ -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]