This function checks if a vector has a "label" attribute.
Arguments
- x
A vector to be checked for a "label" attribute.
Value
A logical value indicating whether the vector has a "label" attribute.
Examples
if (FALSE) { # \dontrun{
# Example usage:
vec <- c("A", "B", "C")
attr(vec, "label") <- "Example Label"
has_label(vec) # Returns TRUE
} # }