mockCohortConstructor {CohortConstructor}R Documentation

Function to create a mock cdm reference for CohortConstructor

Description

mockCohortConstructor() creates an example dataset that can be used for demonstrating and testing the package

Usage

mockCohortConstructor(
  nPerson = 10,
  conceptTable = NULL,
  tables = NULL,
  conceptId = NULL,
  conceptIdClass = NULL,
  drugExposure = FALSE,
  conditionOccurrence = FALSE,
  measurement = FALSE,
  death = FALSE,
  otherTables = NULL,
  con = DBI::dbConnect(duckdb::duckdb()),
  writeSchema = "main",
  seed = 123
)

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

Value

cdm object

Examples


library(CohortConstructor)

cdm <- mockCohortConstructor()

cdm


[Package CohortConstructor version 0.2.1 Index]