Assign or extract variable labels of a vector
or
the columns (i.e., vectors) of a data.frame
.
variable_label(object)variable_label(object) <- value
# S4 method for annotated_vector
variable_label(object)
# S4 method for data.frame
variable_label(object)
# S4 method for annotated_vector,character
variable_label(object) <- value
# S4 method for vector,character
variable_label(object) <- value
# S4 method for factor,character
variable_label(object) <- value
# S4 method for annotated_factor,character
variable_label(object) <- value
# S4 method for data.frame,character
variable_label(object) <- value
Either a vector or a data.frame
.
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.