tests/testthat/_snaps/stat_km_compute.md

h_surv_fit works as expected

c(0.9, 0.8, 0.8, 0.685714285714286, 0.571428571428571, 0.457142857142857, 
0.457142857142857, 0.304761904761905, 0.304761904761905, 0.304761904761905
)

stat_km_compute works as expected

structure(list(time = c(0, 0.3, 0.6, 1.4, 1.7, 3, 3.4, 3.9, 4.1, 
4.3, 5.6), survival = c(1, 0.9, 0.8, 0.8, 0.685714285714286, 
0.571428571428571, 0.457142857142857, 0.457142857142857, 0.304761904761905, 
0.304761904761905, 0.304761904761905)), class = "data.frame", row.names = c(NA, 
-11L))

stat_km_ticks_compute works as expected

structure(list(time = c(0.3, 0.6, 1.4, 1.7, 3, 3.4, 3.9, 4.1, 
4.3, 5.6), survival = c(0.9, 0.8, 0.8, 0.685714285714286, 0.571428571428571, 
0.457142857142857, 0.457142857142857, 0.304761904761905, 0.304761904761905, 
0.304761904761905), n.risk = c(10, 9, 8, 7, 6, 5, 4, 3, 2, 1), 
    n.censor = c(0, 0, 1, 0, 0, 0, 1, 0, 1, 1), n.event = c(1, 
    1, 0, 1, 1, 1, 0, 1, 0, 0)), class = "data.frame", row.names = c(NA, 
-10L))


Try the ggplot2.utils package in your browser

Any scripts or data that you put into this service are public.

ggplot2.utils documentation built on June 26, 2024, 1:06 a.m.