Learn R Programming

CDMConnector (version 2.4.0)

generateCohortSetLocal: Generate a cohort set on a local CDM (list of dataframes)

Description

Copies the local CDM to an in-memory DuckDB database, runs generateCohortSet, then collects the generated cohort table and its attributes back into R and adds them to the input CDM.

Usage

generateCohortSetLocal(
  cdm,
  cohortSet,
  name,
  computeAttrition = TRUE,
  overwrite = TRUE
)

Value

The input cdm with the new cohort table added (as local dataframes).

Arguments

cdm

A local cdm object (list of dataframes, e.g. from dplyr::collect(cdm)).

cohortSet

A cohort set from readCohortSet.

name

Name of the cohort table to create.

computeAttrition

Whether to compute attrition.

overwrite

Whether to overwrite an existing cohort table.