Skip to contents

It creates a mock database for testing OmopSketch package

Usage

mockOmopSketch(con = NULL, writeSchema = NULL, numberIndividuals = 100)

Arguments

con

A DBI connection to create the cdm mock object. By default, the connection would be "duckdb".

writeSchema

Name of an schema on the same connection with writing permissions.

numberIndividuals

Number of individuals to create in the cdm reference.

Value

A mock cdm_reference object created following user's specifications.

Examples

# \donttest{
mockOmopSketch(numberIndividuals = 1000,
               writeSchema = NULL,
               con = NULL)
#> Note: method with signature ‘DBIConnection#Id’ chosen for function ‘dbExistsTable’,
#>  target signature ‘duckdb_connection#Id’.
#>  "duckdb_connection#ANY" would also be valid
#> 
#> ── # OMOP CDM reference (duckdb) of mockOmopSketch ─────────────────────────────
#>omop tables: person, observation_period, cdm_source, concept, vocabulary,
#> concept_relationship, concept_synonym, concept_ancestor, drug_strength,
#> condition_occurrence, death, drug_exposure, measurement, observation,
#> procedure_occurrence, device_exposure, visit_occurrence
#>cohort tables: -
#>achilles tables: -
#>other tables: -
# }