cut_data_by_date: Cut a Dataset for Analysis at a Specified Date

View source: R/cutData.R

cut_data_by_dateR Documentation

Cut a Dataset for Analysis at a Specified Date

Description

Cut a Dataset for Analysis at a Specified Date

Usage

cut_data_by_date(x, cut_date)

Arguments

x

a time-to-event dataset, e.g., generated by simPWSurv

cut_date

date relative to start of randomization (cte from input dataset) at which dataset is to be cut off for analysis

Value

A dataset ready for survival analysis

Examples

# Use default enrollment and event rates and
# cut at calendar time 5 after start of randomization
library(dplyr)
sim_pw_surv(n = 20) %>% cut_data_by_date(5)


keaven/simtrial documentation built on April 17, 2023, 4:03 a.m.