Adds human-readable variable labels to an SRTR dataset using the SRTR data dictionary.
Details
If file_key is not explicitly provided, the function will first check
for a file_key attribute on the data frame. If not found, it will attempt
to infer it from the object name.
Examples
if (FALSE) { # \dontrun{
# Explicit file_key
df <- read_sas("TX_KI.sas7bdat")
df <- apply_srtr_varlabels(df, file_key = "TX_KI", verbose = TRUE)
# Implicit file_key from attribute (if loaded via load_srtr_file)
df <- load_srtr_file("TX_KI")
df <- apply_srtr_varlabels(df)
# Fallback to object name inference
TX_KI <- read_sas("TX_KI.sas7bdat")
TX_KI <- apply_srtr_varlabels(TX_KI)
} # }
