Get the variable labels of a labelled tibble in an enframed tibble
Source: R/enframed_and_labelled.R
get_labels_enframed.RdGiven a data tibble/data.frame, this function will return a tibble in
enframed format (two columns named name and value, see tibble::enframe()
for details), where the name column contains the names of the variables in
the original tibble and the value column contains the labels.
This can be used to review the labels, and could (if coupled with a
set_labels_enframed() function, which is not currently implemented) be used
to preserve labels across label-destructive operations, or export labels to a
file (or a sheet in an excel file).
Finally, it could be used in conjunction with zmisc::lookup() and
dplyr::rename_with() in a pipe to rename variables in order to replace the
names of variables with their labels for display in a plot or table function
that does not support the display of labels in a simple way.