rename(mtcars, MilesPerGallon = mpg)
rename(mtcars, Cylinders = cyl, Gears = gear)
mtcars %>% rename(MilesPerGallon = mpg)
rename_with(mtcars, toupper)
rename_with(mtcars, toupper, starts_with("c"))
Run the code above in your browser using DataLab