This function retrieves the label of a heading from a labels file.
Examples
LABELS <- data.frame(
Variable = c("USUBJID", "AVAL"),
Label = c("Unique Subject Identifier", "Analysis Value"),
Dataset = c("ADNCA", "ADNCA")
)
get_label("USUBJID", "ADNCA", LABELS) # Returns "Unique Subject Identifier"
#> [1] "Unique Subject Identifier"
get_label("AGE", "ADNCA", LABELS) # Returns "AGE"
#> [1] "AGE"