If you want to get or set column names with colnames function in r. Please see the following article from us.
#R #setcolumnnameswithcolnamesfunctioninR
datastorages.org/r-programming/colnames-function-in-r/