Last chance! 50% off unlimited learning
Sale ends in
rename()
changes the names of individual variables using new_name = old_name
syntax.
rename(.data, ...)
A data.frame
Comma separated key-value pairs in the form of new_name = old_name
to rename selected variables.
A data.frame
# 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