get_codelist {sdtmval} | R Documentation |
Read in the code list from the specification for a specific domain
Description
Reads-in the "Codelists"
sheet from the study's specification MS Excel file
and then filters that code list by the variables in the domain
Usage
get_codelist(
domain,
dir,
filename,
var_col = "Variable",
codelist_sheet = "Codelists",
varid_col = "ID"
)
Arguments
domain |
string, SDTM domain or supplemental domain code |
dir |
string, specification directory |
filename |
string, file name of the specification |
var_col |
a string, the column name in the domain spec sheet that
contains the variables for that domain, default is |
codelist_sheet |
a string, the sheet name of the spec's code list from
the spec's .xlsx file, default is |
varid_col |
a string, the column name in the |
Value
a data frame with the code list
See Also
get_data_spec()
, get_key_vars()
, assign_meta_data()
Examples
work_dir <- system.file("extdata", package = "sdtmval")
codelists <- get_codelist(domain = 'XX',
dir = work_dir,
filename = "spec.xlsx")
[Package sdtmval version 0.4.1 Index]