powered by
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
"Codelists"
get_codelist( domain, dir, filename, var_col = "Variable", codelist_sheet = "Codelists", varid_col = "ID" )
a data frame with the code list
string, SDTM domain or supplemental domain code
string, specification directory
string, file name of the specification
a string, the column name in the domain spec sheet that contains the variables for that domain, default is "Variable"
"Variable"
a string, the sheet name of the spec's code list from the spec's .xlsx file, default is "Codelists"
a string, the column name in the codelist_sheet table from the spec's .xlsx file that contains the variable names, default is "ID"
codelist_sheet
"ID"
get_data_spec(), get_key_vars(), assign_meta_data()
get_data_spec()
get_key_vars()
assign_meta_data()
work_dir <- system.file("extdata", package = "sdtmval") codelists <- get_codelist(domain = 'XX', dir = work_dir, filename = "spec.xlsx")
Run the code above in your browser using DataLab