omopr_init: Initialise connection to an 'OMOP' 'CDM' database and get...

Description Usage Arguments Value See Also Examples

View source: R/omopr_init.R

Description

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.

Usage

1
omopr_init(con, schema = NULL)

Arguments

con

A database connection, such as returned by the function dbConnect.

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.

Value

A named list with elements corresponding to dbplyr lazy tibble references.

See Also

concept_names, row_counts

Examples

1
2
3
4
5
6
# 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)

omopr documentation built on July 1, 2020, 8:03 p.m.