Learn R Programming

DescrTab2 (version 2.1.16)

extract_labels: Extract the label attribute from data

Description

Extract the label attribute from data

Usage

extract_labels(dat)

Value

list of labels

Arguments

dat

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

Examples

Run this code
a <- c(1, 2)
attr(a, "label") <- "b"
identical(extract_labels(a), list(a = attr(a, "label")))

Run the code above in your browser using DataLab