View source: R/lookup_domain.R
lookup_in_domain | R Documentation |
Lookup a value in domain data
lookup_in_domain(domain, value_col, key_col, key_val)
domain |
Quoted name of the domain data object |
value_col |
Quoted name of the column from which to pull values |
key_col |
Quoted name of the column to match with key_val |
key_val |
An expression that evaluates to values to match in key_col |
This function allows one to lookup values in domain data. The domain name, and the two columns to use in it are given as quoted strings. This allows the function to be used within query mappings, which would otherwise error on the domain and column names that do not match the query's mapped domain's columns. The key_val is given unquoted so the expression will be evaluated when the function is called.
One particular use is to find the treatment start date for a given ID in a query.
a vector of values from value_col, of length of key_val
## Not run:
lookup_in_domain("DM", "RFXSTDTC", "USUBJID", ID)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.