# \donttest{
library(CohortConstructor)
cdm <- mockCohortConstructor()
cdm$cohort2 <- cdm$cohort1 |>
requireInDateRange(
indexDate = "cohort_start_date",
dateRange = as.Date(c("2010-01-01", "2019-01-01")),
name = "cohort2"
)
# modify same input cohort table to start between 2010 until end of data
cdm$cohort1 <- cdm$cohort1 |>
requireInDateRange(
indexDate = "cohort_start_date",
dateRange = as.Date(c("2010-01-01", NA))
)
# }
Run the code above in your browser using DataLab