Capr is part of HADES


The goal of Capr, pronounced ‘kay-pr’ like the edible flower, is to provide a language for expressing OHDSI Cohort definitions in R code. OHDSI defines a cohort as “a set of persons who satisfy one or more inclusion criteria for a duration of time” and provides a standardized approach for defining them (Circe-be). Capr exposes the standardized approach to cohort building through a programmatic interface in R which is particularly helpful when creating a large number of similar cohorts. Capr version 2 introduces a new user interface designed for readability with the goal that Capr code being a human readable description of a cohort while also being executable on an OMOP Common Data Model.

Learn more about the OHDSI approach to cohort building in the cohorts chapter of the Book of OHDSI.


Users can install the current development version of Capr from GitHub with:

# install.packages("devtools")

User Documentation

Documentation can be found on the package website.

PDF versions of the documentation are also available:



Read here how you can contribute to this package.


Capr is licensed under Apache License 2.0


Capr is being developed in R Studio.


  • This package is maintained by Martin Lavallee and Adam Black
  • Guidance and support for the original development of Capr came from Lee Evans and LTS Computing LLC