powered by
subsetCohorts() filters an existing cohort table, keeping only the records from cohorts that are specified.
subsetCohorts()
subsetCohorts(cohort, cohortId, name = tableName(cohort))
Cohort table with only cohorts in cohortId.
A cohort table in a cdm reference.
Vector identifying which cohorts to include (cohort_definition_id or cohort_name). Cohorts not included will be removed from the cohort set.
Name of the new cohort table created in the cdm object.
# \donttest{ library(CohortConstructor) cdm <- mockCohortConstructor(nPerson = 100) cdm$cohort1 |> subsetCohorts(cohortId = 1) # }
Run the code above in your browser using DataLab