# \donttest{
library(CohortConstructor)
cdm <- mockCohortConstructor()
cohort <- cdm |>
demographicsCohort(name = "cohort3", ageRange = c(18,40), sex = "Male")
attrition(cohort)
# Can also create multiple demographic cohorts, and add minimum prior history requirements.
cohort <- cdm |>
demographicsCohort(name = "cohort4",
ageRange = list(c(0, 19),c(20, 64),c(65, 150)),
sex = c("Male", "Female", "Both"),
minPriorObservation = 365)
attrition(cohort)
# }
Run the code above in your browser using DataLab