Check out example codes for "r: rename a column". It will help you in understanding the concepts better.

Code Example 1

colnames(df)[which(names(df) == "columnName")] <- "newColumnName"

Learn ReactJs, React Native from akashmittal.com