I have a data frame that has headers as this
Name 0x1 1x2
read.csv changes the header to be
Name X0x1 X1x2
I met the same problem. The solution for me on MAC machine is to save the file with fileEncoding = "macintosh". Then read it by doing check.names = F.