getLabelVars: Get label of the variables in SAS dataset(s)

Description Usage Arguments Value Author(s) Examples

View source: R/loadDataADaMSDTM.R

Description

Get label of the variables in SAS dataset(s)

Usage

1
getLabelVars(data, labelVars = NULL)

Arguments

data

Data.frame with SAS dataset(s) or list of those.

labelVars

(optional) Named character vector with additional labels.

Value

Named vector with variable labels.

Author(s)

Laure Cougnaud

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(dataADaMCDISCP01)
labelVars <- attr(dataADaMCDISCP01, "labelVars")

# extract label for all variables from specified datasets:
getLabelVars(data = dataADaMCDISCP01[c("ADLBC", "ADVS")], labelVars = labelVars)

# extracted from specified labelVars, e.g. to specify custom label for specific variable(s)
labelVarsCustom <- getLabelVars(
  data = dataADaMCDISCP01, 
  labelVars = c(USUBJID = "Subject identifier for my study")
)
labelVarsCustom["USUBJID"]

clinUtils documentation built on June 8, 2021, 9:06 a.m.