15.5 Renaming Columns in a Data Frame

15.5.1 Problem

You want to rename the columns in a data frame.

15.5.2 Solution

Use rename() from dplyr. This returns a new data frame, which you’ll typically want save over the original.

15.5.4 See Also

See ?select for more ways to rename columns within a data frame.