Description Usage Arguments Details Value
Switch 'labels' and column names in a data frame
1 | switch_labels(df, remove_prefix = 0)
|
df |
the data.frame (or tibble) to process |
remove_prefix |
number of characters to skip from label at the beginning (4 removes standard (en) prefix) |
If a column does not have a 'label' attribute, it is skipped. If labels are not unique, subsequent columns are ignored and a warning is issued.
df
where each column is renamed to its attribute 'label';
previous column name is stored as attribute 'label'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.