powered by
Rename every column of a dataframe with its label
rename_with_labels(df, except = NULL)
A dataframe which names are copied from the label attribute
a data.frame
<tidy-select> columns that should not be renamed.
tidy-select
Dan Chaltiel
rename_with_labels(mtcars2[,1:5], except=5) %>% names() rename_with_labels(iris2, except=Sepal.Length) %>% names() rename_with_labels(iris2, except=starts_with("Pet")) %>% names()
Run the code above in your browser using DataLab