R/loadData.R
extract_labels.Rd
Extract the label attribute from data
extract_labels(dat)
data in the form of a list, data.frame or tibble, or a vector
list
data.frame
tibble
list of labels
a <- c(1, 2) attr(a, "label") <- "b" identical(extract_labels(a), list(a = attr(a, "label"))) #> [1] TRUE