Assign or extract variable labels of a vector
or
the columns (i.e., vectors) of a data.frame
.
variable_label(x, ...)# S3 method for default
variable_label(x, ...)
# S3 method for data.frame
variable_label(x, ...)
variable_label(x) <- value
# S3 method for default
variable_label(x) <- value
# S3 method for data.frame
variable_label(x) <- value
variable_labels(x, ...)
variable_labels(x) <- value
Either a vector or a data.frame
.
Further arguments that can be passes to methods.
Character. The variable label(s) to be assigned. If variable_label
is applied to a single vector,
this should be a length-one argument. If applied to a data.frame
, value
is required to be a named vector.
Check the examples for details.