concept_names: Resolve concept names in the supplied lazy table reference

Description Usage Arguments Value See Also Examples

View source: R/concept_names.R

Description

This function accepts a (lazy) tibble and for each variable of the form XXX_concept_id adds a corresponding variable XXX_concept_name obtained by (left) joining against the concept table of the 'CDM'.

Usage

1
2
concept_names(tibl, names = NULL, cin = omopr.global$cin,
                          verb = FALSE, fill = FALSE, copy = FALSE)

Arguments

tibl

A (lazy) reference to a tibble.

names

An optional list of concept_ids to be resolved. Defaults to all.

cin

A (lazy) reference to a vocabulary tibble with variables concept_id and concept_name, used to resolve the concepts.

verb

If true, print progress to the console.

fill

If true, fill non-matching concept names with a string conversion of the concept ID.

copy

copy arg to be passed to left_join. Will need to be true if input tibble is not a lazy reference, but will be very slow in that case. Work with lazy references as long as possible.

Value

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

See Also

omopr_init, row_counts

Examples

1
2
3
4
con = omopr:::dummy_con() # dummy connection to allow example to run

tRefs = omopr_init(con)
tRefs[["measurement"]] %>% concept_names()

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