set_empty_label.Rd
This function sets an empty "label" attribute for a vector if it does not already have one.
set_empty_label(x)
A vector to be checked and potentially assigned an empty "label" attribute.
The vector with an empty "label" attribute if it did not already have one.
if (FALSE) { # \dontrun{ # Example usage: vec <- c("A", "B", "C") vec <- set_empty_label(vec) print(attr(vec, "label")) # Returns "" } # }