View source: R/enframed_and_labelled.R
get_labels_enframed | R Documentation |
labelled tibble
in an enframed tibble
Given 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.
get_labels_enframed(d)
d |
The |
A tibble
in enframed
format containing variable names and labels.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.