get_key_vars {sdtmval} | R Documentation |
Read in the key variables for a SDTM domain
Description
Reads the "Key Variables"
column from the SDTM specification MS Excel
file's "Datasets"
sheet for the specified domain
.
Usage
get_key_vars(
domain,
dir,
filename,
datasets_sheet = "Datasets",
dataset_col = "Dataset",
keyvar_col = "Key Variables"
)
Arguments
domain |
string, SDTM domain or supplemental domain code |
dir |
string, specification directory |
filename |
string, file name of the specification |
datasets_sheet |
a string, the sheet name in the specification Excel
file that has the key variables, default is |
dataset_col |
a string, the column name of the domains in the table in
|
keyvar_col |
a string, the column name of the key variables in the table
in |
Details
The readxl::read_excel()
function will causes an access denied warning when
reading in a read-only specification file. This does not affect the data
import.
Value
a character vector of key variables for the specified domain
See Also
get_data_spec()
, get_codelist()
, assign_meta_data()
Examples
work_dir <- system.file("extdata", package = "sdtmval")
key_vars <- get_key_vars(domain = "XX",
dir = work_dir,
filename = "spec.xlsx")