Learn R Programming

CDMConnector (version 1.7.0)

cdmSelectTbl: Select a subset of tables in a cdm reference object

Description

This function uses syntax similar to dplyr::select and can be used to subset a cdm reference object to a specific tables

Usage

cdmSelectTbl(cdm, ...)

cdm_select_tbl(cdm, ...)

Value

A cdm reference object containing the selected tables

Arguments

cdm

A cdm reference object created by cdm_from_con

...

One or more table names of the tables of the cdm object. tidyselect is supported, see dplyr::select() for details on the semantics.

Examples

Run this code
if (FALSE) {
con <- DBI::dbConnect(duckdb::duckdb(), dbdir = eunomiaDir())

cdm <- cdmFromCon(con, "main")

cdmSelectTbl(cdm, person)
cdmSelectTbl(cdm, person, observation_period)
cdmSelectTbl(cdm, tblGroup("vocab"))
cdmSelectTbl(cdm, "person")

DBI::dbDisconnect(con)
}

Run the code above in your browser using DataLab