var_labels {formatters} | R Documentation |
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)
Arguments
x |
( |
fill |
( |
Value
a named character vector of variable labels from x
, with names corresponding
to variable names.
Examples
x <- iris
var_labels(x)
var_labels(x) <- paste("label for", names(iris))
var_labels(x)
[Package formatters version 0.5.8 Index]