r code rename column name based on mapping table code example
Example 1: rename column in r
my_data %>%
rename(
sepal_length = Sepal.Length,
sepal_width = Sepal.Width
)
Example 2: r dataframe change column name
names(df)[1] <- paste("newName")