I have imported a CSV file in R using dplyr::read_csv. The CSV file contains variable names many of which contain spaces. Some of the variable names are also in number e.g., 17, 18 etc. I would like to rename these variables to something more meaningful.
I have tried the following codes for example:
rename(burkina, enum = Enumerator)
rename(burkina, enum = `Enumerator`)
rename(burkina, enum = "Enumerator")
rename(burkina,test = `17`)
None of them seemed to have worked. Instead, I got the following error:
Error in make.names(x) : invalid multibyte string 1