View source: R/retrieve_labels.R
retrieve_labels | R Documentation |
Retrieve labels from labelled data
retrieve_labels(data, wide = TRUE)
data |
labelled data frame |
wide |
format of return: wide (default) returns a tibble with a single row that contains the variable labels; otherwise, the full data dictionary is returned |
a tibble
dat_labelled <- tibble::tibble(
var_1 = 1:3,
var_2 = LETTERS[1:3],
var_3 = Sys.Date() - 0:2
) %>%
labelled::set_variable_labels(
var_1 = "Variable 1 (numbers)",
var_2 = "Variable 2 (letters)",
var_3 = "Variable 3 (date)"
)
retrieve_labels(dat_labelled)
retrieve_labels(dat_labelled, wide = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.