-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
featurea feature request or enhancementa feature request or enhancement
Description
it'd be good to have a simple error message explaining that you can't stratify on a Surv object rather than have the error from survival bubble up.
library(rsample)
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(survival)
data("lung")
lung %>%
mutate(surv = Surv(time, status)) %>%
initial_split(strata = "surv")
#> Error in Ops.Surv(x[hi], qs): Invalid operation on a survival timeCreated on 2021-03-16 by the reprex package (v1.0.0)
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancement