Computes the subject and entry count per cohort
getCohortCounts(
connectionDetails = NULL,
connection = NULL,
cohortDatabaseSchema,
cohortTable = "cohort",
cohortIds = c()
)
An object of type connectionDetails
as created using the
createConnectionDetails
function in the
DatabaseConnector package. Can be left NULL if connection
is
provided.
An object of type connection
as created using the
connect
function in the
DatabaseConnector package. Can be left NULL if connectionDetails
is provided, in which case a new connection will be opened at the start
of the function, and closed when the function finishes.
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'.
Name of the cohort table.
The cohort Id(s) used to reference the cohort in the cohort table. If left empty, all cohorts in the table will be included.
A tibble with cohort counts