Package: CohortConstructor 0.6.3.900

Edward Burn

CohortConstructor: Build and Manipulate Study Cohorts Using a Common Data Model

Create and manipulate study cohorts in data mapped to the Observational Medical Outcomes Partnership Common Data Model.

Authors:Edward Burn [aut, cre], Martí Català [aut], Nuria Mercade-Besora [aut], Marta Alcalde-Herraiz [aut], Mike Du [aut], Yuchen Guo [aut], Xihang Chen [aut], Kim Lopez-Guell [aut], Elin Rowlands [aut]

CohortConstructor_0.6.3.900.tar.gz
CohortConstructor_0.6.3.900.zip(r-4.7)CohortConstructor_0.6.3.900.zip(r-4.6)CohortConstructor_0.6.3.900.zip(r-4.5)
CohortConstructor_0.6.3.900.tgz(r-4.6-any)CohortConstructor_0.6.3.900.tgz(r-4.5-any)
CohortConstructor_0.6.3.900.tar.gz(r-4.7-any)CohortConstructor_0.6.3.900.tar.gz(r-4.6-any)
CohortConstructor_0.6.3.900.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
CohortConstructor/json (API)
NEWS

# Install 'CohortConstructor' in R:
install.packages('CohortConstructor', repos = c('https://ohdsi.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ohdsi/cohortconstructor/issues

Pkgdown/docs site:https://ohdsi.github.io

Datasets:

On CRAN:

Conda:

10.77 score 10 stars 4 packages 204 scripts 1.4k downloads 52 exports 30 dependencies

Last updated from:d7df2dba61. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK171
source / vignettesOK286
linux-release-x86_64OK193
macos-release-arm64OK138
macos-oldrel-arm64OK101
windows-develOK129
windows-releaseOK144
windows-oldrelOK120
wasm-releaseOK147

Exports:addCohortTableIndexattritionbenchmarkCohortConstructorbindcohortCodelistcohortCountcollapseCohortsconceptCohortcopyCohortsdeathCohortdemographicsCohortendDateColumnentryAtFirstDateentryAtLastDateexitAtDeathexitAtFirstDateexitAtLastDateexitAtObservationEndintersectCohortsmatchCohortsmeasurementCohortmockCohortConstructorpadCohortDatepadCohortEndpadCohortStartrenameCohortrequireAgerequireCohortIntersectrequireConceptIntersectrequireDemographicsrequireDurationrequireFutureObservationrequireInDateRangerequireIsEntryrequireIsFirstEntryrequireIsLastEntryrequireMinCohortCountrequirePriorObservationrequireSexrequireTableIntersectsampleCohortssettingsstartDateColumnstratifyCohortssubsetCohortstableNametimeWindowCohortstrimDemographicstrimDurationtrimToDateRangeunionCohortsyearCohorts

Dependencies:blobcliclockCodelistGeneratorcpp11DBIdbplyrdplyrgenericsgluejsonlitelifecyclemagrittromopgenericsPatientProfilespillarpkgconfigpurrrR6rlangsnakecasestringistringrtibbletidyrtidyselecttzdbutf8vctrswithr

Introduction

Rendered froma00_introduction.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2025-04-05
Started: 2024-05-11

Building base cohorts

Rendered froma01_building_base_cohorts.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2026-01-08
Started: 2024-05-10

Applying cohort table requirements

Rendered froma02_cohort_table_requirements.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2025-12-23
Started: 2024-08-28

Applying demographic requirements to a cohort

Rendered froma03_require_demographics.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2025-12-23
Started: 2024-08-28

Applying requirements related to other cohorts, concept sets, or tables

Rendered froma04_require_intersections.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2025-10-21
Started: 2024-08-28

Updating cohort start and end dates

Rendered froma05_update_cohort_start_end.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2025-12-23
Started: 2024-08-28

Concatenating cohort records

Rendered froma06_concatanate_cohorts.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2025-10-03
Started: 2024-08-28

Filtering cohorts

Rendered froma07_filter_cohorts.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2025-10-03
Started: 2024-08-28

Combining Cohorts

Rendered froma09_combine_cohorts.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2025-10-03
Started: 2024-08-28

Splitting cohorts

Rendered froma08_split_cohorts.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2025-10-03
Started: 2024-08-28

CohortConstructor benchmarking results

Rendered froma11_benchmark.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2025-10-03
Started: 2024-09-10

Behind the scenes

Rendered froma12_behind_the_scenes.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2025-11-01
Started: 2025-02-22

Generating a matched cohort

Rendered froma10_match_cohorts.Rmdusingknitr::rmarkdownon May 31 2026.

Last update: 2025-10-03
Started: 2024-08-28

Readme and manuals

Help Manual

Help pageTopics
Add an index to a cohort tableaddCohortTableIndex
Run benchmark of CohortConstructor packagebenchmarkCohortConstructor
Benchmarking resultsbenchmarkData
Collapse cohort entries using a certain gap to concatenate records.collapseCohorts
Create cohorts based on a concept setconceptCohort
Copy a cohort tablecopyCohorts
Create cohort based on the death tabledeathCohort
Create cohorts based on patient demographicsdemographicsCohort
Update cohort start date to be the first date from of a set of column datesentryAtFirstDate
Set cohort start date to the last of a set of column datesentryAtLastDate
Set cohort end date to death dateexitAtDeath
Set cohort end date to the first of a set of column datesexitAtFirstDate
Set cohort end date to the last of a set of column datesexitAtLastDate
Set cohort end date to end of observationexitAtObservationEnd
Generate a combination cohort set between the intersection of different cohorts.intersectCohorts
Generate a new cohort matched cohortmatchCohorts
Create measurement-based cohortsmeasurementCohort
Function to create a mock cdm reference for CohortConstructormockCohortConstructor
Set cohort start or cohort endpadCohortDate
Add days to cohort endpadCohortEnd
Add days to cohort startpadCohortStart
Utility function to change the name of a cohort.renameCohort
Restrict cohort on agerequireAge
Require cohort subjects are present (or absence) in another cohortrequireCohortIntersect
Require cohort subjects to have (or not have) events of a concept listrequireConceptIntersect
Restrict cohort on patient demographicsrequireDemographics
Require cohort entries last for a certain number of daysrequireDuration
Restrict cohort on future observationrequireFutureObservation
Require that an index date is within a date rangerequireInDateRange
Restrict cohort to specific entryrequireIsEntry
Restrict cohort to first entryrequireIsFirstEntry
Restrict cohort to last entry per personrequireIsLastEntry
Filter cohorts to keep only records for those with a minimum amount of subjectsrequireMinCohortCount
Restrict cohort on prior observationrequirePriorObservation
Restrict cohort on sexrequireSex
Require cohort subjects are present in another clinical tablerequireTableIntersect
Sample a cohort table for a given number of individuals.sampleCohorts
Create a new cohort table from stratifying an existing onestratifyCohorts
Generate a cohort table keeping a subset of cohorts.subsetCohorts
Split cohorts based on time-windowstimeWindowCohorts
Trim cohort on patient demographicstrimDemographics
Trim cohort dates to be within a certain interval of daystrimDuration
Trim cohort dates to be within a date rangetrimToDateRange
Generate cohort from the union of different cohortsunionCohorts
Generate a new cohort table restricting cohort entries to certain yearsyearCohorts