Skip to content

Commit 46bbc4e

Browse files
committed
survival POC
[skip CI]
1 parent 9253ed1 commit 46bbc4e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/testthat/test-quick_surv.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ test_that("survival POC", {
2222
fit = survival::survfit(surv~group, data=df)
2323
times = sort(fit$time)
2424

25-
a = summary(fit, times=times, extend=TRUE, data.frame=TRUE)
25+
x = summary(fit, times=times, extend=TRUE)
26+
a = data.frame(strata=x$strata, time=x$time, n.risk=x$n.risk, n.event=x$n.event, surv=x$surv)
27+
2628
a %>%
2729
dplyr::filter(strata=="group=B") %>%
28-
dplyr::filter(time>120 & time<150) %>%
29-
dplyr::select(strata, time, n.risk, n.event, surv)
30-
30+
dplyr::filter(time>120 & time<150)
3131
})
3232

3333

0 commit comments

Comments
 (0)