powered by
rename() changes the names of individual variables using new_name = old_name syntax.
rename()
new_name = old_name
rename(.data, ...)
A data.frame
data.frame
Comma separated key-value pairs in the form of new_name = old_name to rename selected variables.
# NOT RUN { rename(mtcars, MilesPerGallon = mpg) rename(mtcars, Cylinders = cyl, Gears = gear) mtcars %>% rename(MilesPerGallon = mpg) # }
Run the code above in your browser using DataLab