View source: R/cutDataAtCount.R
cut_data_by_event | R Documentation |
cut_data_by_event
takes a time-to-event data set and cuts the data at which an
event count is reached.
cut_data_by_event(x, count)
x |
a time-to-event dataset, e.g., generated by |
count |
event count at which data cutoff is to be made |
a tibble
ready for survival analysis, including culumns time to event (tte
),
event
, the stratum
and the treatment.
library(tidyr)
# Use default enrollment and event rates at cut at 100 events
x <- sim_pw_surv(n = 200) %>% cut_data_by_event(100)
table(x$event, x$Treatment)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.