Take the selected UKB variables from the protocol stage and subset the RAP specific variables list.
Source:R/deprecated.R
subset_rap_variables.Rd
This is done because RAP has a special naming system for their variables inside the UK Biobank dataset that is slightly different from how the UK Biobank names them.
Usage
subset_rap_variables(
project_variables_file = "data-raw/project-variables.csv",
rap_variables_file = "data-raw/rap-variables.csv",
instances = 0:9,
save = TRUE
)
Arguments
- project_variables_file
The file location for the project variable CSV file. Defaults to
data-raw/project-variables.csv
.- rap_variables_file
The file location for the RAP specific variable CSV file. Defaults to
data-raw/rap-variables.csv
.- instances
An "instance" in UK Biobank is a time point of collection for the variable. So a variable with Instance 0 and Instance 1 means that the variable was collected twice at two different times. The default is to select all the time points. Max is 9 instances, and while many variables have up to 4 instances, the majority only have one (e.g. 0).
- save
Whether to save (and overwrite) the newly subsetted RAP variables.