【发布时间】:2021-08-25 13:22:37
【问题描述】:
我正在阅读 .csv 文件,其中列名的格式为:
'reported_#_date', 'reported_#_date2' etc
问题是当我读到它时:
data <- read.csv("mydata.csv")
这些列名现在更改为
'reported_._date', 'reported_._date2'
通常这不会有太大区别,但这些列名是我的 PID,我也需要在其他地方引用它们,保留原始名称。有谁知道为什么 R 会这样做?有没有办法阻止它改变?
【问题讨论】: