Closed
Description
It currently returns a vector instead of the 1-row tibble.
times <- seq(1, 100, length.out = 5)
times2 <- seq(100, 200, length.out = 5)
events <- c(1, 0, 1, 0, 1)
intv_c <- survival::Surv(times, times2, events, type = "interval")
count_c <- survival::Surv(times, times2, events)
parsnip:::.extract_surv_time(intv_c[1])
#> time1 time2
#> 1 1
parsnip:::.extract_surv_time(count_c[1])
#> start stop
#> 1 100
Created on 2023-11-13 with reprex v2.0.2