This function creates an empty cohort table and empty tables for cohort statistics.
Usage
createCohortTables(
  connectionDetails = NULL,
  connection = NULL,
  cohortDatabaseSchema,
  cohortTableNames = getCohortTableNames(),
  incremental = FALSE
)Arguments
- connectionDetails
- An object of type - connectionDetailsas created using the- createConnectionDetailsfunction in the DatabaseConnector package. Can be left NULL if- connectionis provided.
- connection
- An object of type - connectionas created using the- connectfunction in the DatabaseConnector package. Can be left NULL if- connectionDetailsis provided, in which case a new connection will be opened at the start of the function, and closed when the function finishes.
- cohortDatabaseSchema
- Schema name where your cohort tables reside. Note that for SQL Server, this should include both the database and schema name, for example 'scratch.dbo'. 
- cohortTableNames
- The names of the cohort tables. See - getCohortTableNamesfor more details.
- incremental
- When set to TRUE, this function will check to see if the cohortTableNames exists in the cohortDatabaseSchema and if they exist, it will skip creating the tables.