Hello Varun, You should use the colnames() function,
  1. colnames(dataframe)[which(names(dataframe) == "columnName")] <- "newColumnName"  
 
Go through be;ow articles / blogs
https://statisticsglobe.com/rename-column-name-in-r-data-frame/
https://stackoverflow.com/questions/6081439/changing-column-names-of-a-data-frame
https://www.tutorialkart.com/r-tutorial/r-dataframe-change-column-name/