omopr_init {omopr} | R Documentation |
This function checks a connection to an 'OMOP' 'CDM' database and creates and returns a list of lazy 'dbplyr' table references corresponding to the available 'CDM' tables.
omopr_init(con, schema = NULL)
con |
A database connection, such as returned by the function |
schema |
Optional string name of a database schema in which the 'OMOP' 'CDM' tables are stored. Potential examples include "public", "dbo", "omop", "cdm", "data", etc. |
A named list with elements corresponding to dbplyr
lazy tibble references.
# con = DBI::dbConnect(RPostgres::Postgres(), dbname = "omopdb") con = omopr:::dummy_con() # dummy connection to allow example to run tRefs = omopr_init(con) tRefs[["person"]] row_counts(tRefs)