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

前端 未结 5 2069
眼角桃花
眼角桃花 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-18 22:18

    Using the quote="" option will also prepend an X. for each column of your data.frame. If you can, try to remove that from your read.csv options, else add the check.names=F option which will override that behavior.

提交回复
热议问题