Skip to contents

Instantiates a set of cohorts

Usage

createBenchmarkCohorts(
  cohorts = NULL,
  benchmarkDesign = NULL,
  connectionDetails = NULL,
  cdmDatabaseSchema = cdmDatabaseSchema,
  cohortDatabaseSchema = cohortDatabaseSchema,
  cohortTable = cohortTable,
  incremental = FALSE,
  rawDataFolder = "rawData",
  saveDirectory = getwd()
)

Arguments

cohorts

A data frame with a column named `cohortId` or a data frame with two columns named `targetId` and `outcomeId`. This can be a data frame such as provided by CohortGenerator::getCohortDefinitionSet() or a similar data frame such as the one obtained with viewBenchmarkTasks(). Either cohorts or benchmarkDesign need to be specified.

benchmarkDesign

A list of class `benchmarkDesign` as generated by createBenchmarkDesign().

connectionDetails

The connection details object to connect to the database.

cdmDatabaseSchema

The schema name where the data is located.

cohortDatabaseSchema

The schema where the cohort's will be stored.

cohortTable

The name of the table under which the cohort/s will be created

incremental

A logical to define whether the `cohortTable` will be regenerated if it already exists, or whether to regenerated all cohorts or only those that have yet been generated.

rawDataFolder

Folder name to save cohort counts and incremental folder. Defaults to "rawData".

saveDirectory

Directory to save cohort counts and/or which cohorts have been generated. Defaults to the current working directory.

Details

The user specifies either `cohorts` or inserts a `benchmarkDesign` object to create the desired cohorts.