Error in rename of column names in R

Can you provide a reproducible example of your dataset? It will help if people can see what your dataset looks like, especially with your issue here.