summariseCohortOverlap: Summarise overlap between cohorts in a cohort table

View source: R/summariseCohortOverlap.R

summariseCohortOverlapR Documentation

Summarise overlap between cohorts in a cohort table

Description

Summarise overlap between cohorts in a cohort table

Usage

summariseCohortOverlap(
  cohort,
  cohortId = NULL,
  strata = list(),
  overlapBy = "subject_id"
)

Arguments

cohort

A cohort_table object.

cohortId

A cohort definition id to restrict by. If NULL, all cohorts will be included.

strata

A list of variables to stratify results. These variables must have been added as additional columns in the cohort table.

overlapBy

Columns in cohort to use as record identifiers.

Value

A summary of overlap between cohorts in the cohort table.

Examples


library(CohortCharacteristics)
library(dplyr, warn.conflicts = FALSE)

cdm <- mockCohortCharacteristics()

summariseCohortOverlap(cdm$cohort2) |>
  glimpse()

mockDisconnect(cdm)


CohortCharacteristics documentation built on April 3, 2025, 10:29 p.m.