var_labels: Get label attributes of variables in a data.frame
Description
Variable labels can be stored as a label attribute for each variable.
This functions returns a named character vector with the variable labels
(or empty strings if not specified).
Usage
var_labels(x, fill = FALSE)
Value
a named character vector of variable labels from x, with names corresponding
to variable names.
Arguments
x
(data.frame) a data frame object.
fill
(flag) whether variable names should be returned for variables for
which the label attribute does not exist. If FALSE, these variables are filled with
NAs instead.