R: read.csv adding sub-script “X” in header

前端 未结 5 2079
眼角桃花
眼角桃花 2021-02-18 21:33

I have a data frame that has headers as this

Name  0x1  1x2

read.csv changes the header to be

Name X0x1 X1x2

5条回答
  •  自闭症患者
    2021-02-18 22:17

    I had the same issue on my Mac. There was a X... at the beginning of the first variable. The problem was that the CSV file was actually a CSV UTF-8 (Comma delimited) file. Saving the file as a CSV (Comma separated values) solved it.

提交回复
热议问题