concept_names: Resolve concept names in the supplied lazy table reference
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
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.
Examples
Run this code# NOT RUN {
con = omopr:::dummy_con() # dummy connection to allow example to run
tRefs = omopr_init(con)
tRefs[["measurement"]] %>% concept_names()
# }
Run the code above in your browser using DataLab