powered by
Rename column names and returns the result along with tidyverse code used to generate it.
renameVars(.data, to_be_renamed_list)
original dataframe containing new columns of the renamed columns with tidyverse code attached
a dataframe with columns to rename
a list of the new column names assigned to the old column names ie. list('old column names' = 'new column names')
Owen Jin
code
renamed <- renameVars(iris, to_be_renamed_list = list(Species = "Type", Petal.Width = "P.W")) cat(code(renamed)) head(renamed)
Run the code above in your browser using DataLab