Function to create a mock cdm reference for CohortConstructor
Source:R/mockCohortConstructor.R
mockCohortConstructor.Rd
mockCohortConstructor()
creates an example dataset that can be used for
demonstrating and testing the package
Arguments
- nPerson
number of person in the cdm
- conceptTable
user defined concept table
- tables
list of tables to include in the cdm
- conceptId
list of concept id
- conceptIdClass
the domain class of the conceptId
- drugExposure
T/F include drug exposure table in the cdm
- conditionOccurrence
T/F include condition occurrence in the cdm
- measurement
T/F include measurement in the cdm
- death
T/F include death table in the cdm
- otherTables
it takes a list of single tibble with names to include other tables in the cdm
- con
A DBI connection to create the cdm mock object.
- writeSchema
Name of an schema on the same connection with writing permissions.
- seed
Seed passed to omock::mockCdmFromTable
Examples
# \donttest{
library(CohortConstructor)
cdm <- mockCohortConstructor()
cdm
#>
#> ── # OMOP CDM reference (duckdb) of mock database ──────────────────────────────
#> • omop tables: person, observation_period, cdm_source, concept, vocabulary,
#> concept_relationship, concept_synonym, concept_ancestor, drug_strength
#> • cohort tables: cohort1, cohort2
#> • achilles tables: -
#> • other tables: -
# }