getCohortCounts {CohortGenerator} | R Documentation |
Count the cohort(s)
Description
Computes the subject and entry count per cohort. Note the cohortDefinitionSet parameter is optional - if you specify the cohortDefinitionSet, the cohort counts will be joined to the cohortDefinitionSet to include attributes like the cohortName.
Usage
getCohortCounts(
connectionDetails = NULL,
connection = NULL,
cohortDatabaseSchema,
cohortTable = "cohort",
cohortIds = c(),
cohortDefinitionSet = NULL,
databaseId = NULL
)
Arguments
connectionDetails |
An object of type |
connection |
An object of type |
cohortDatabaseSchema |
Schema name where your cohort table resides. Note that for SQL Server, this should include both the database and schema name, for example 'scratch.dbo'. |
cohortTable |
The name of the cohort table. |
cohortIds |
The cohort Id(s) used to reference the cohort in the cohort table. If left empty and no 'cohortDefinitionSet' argument is specified, all cohorts in the table will be included. If you specify the 'cohortIds' AND 'cohortDefinitionSet', the counts will reflect the 'cohortIds' from the 'cohortDefinitionSet'. |
cohortDefinitionSet |
The
Optionally, this data frame may contain:
|
databaseId |
Optional - when specified, the databaseId will be added to the exported results |
Value
A data frame with cohort counts