Skip to contents

Extract the label attribute from data

Usage

extract_labels(dat)

Arguments

dat

data in the form of a list, data.frame or tibble, or a vector

Value

list of labels

Examples

a <- c(1, 2)
attr(a, "label") <- "b"
identical(extract_labels(a), list(a = attr(a, "label")))
#> [1] TRUE