【发布时间】:2015-08-10 10:13:37
【问题描述】:
我正在尝试将 CSV 文件读入 R。我尝试过:
data <- read.csv(file="train.csv")
Warning message:
In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
EOF within quoted string
但是,这仅读取了总观察值的一小部分。然后我尝试删除引号:
data <- read.csv(file="train.csv",quote = "",sep = ",",header = TRUE)
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
more columns than column names
由于数据是文本,所以分隔符似乎有问题。
很难共享整个数据集,因为它非常庞大。我尝试转到错误所在的行,但似乎没有不可打印的字符。我还尝试了其他阅读器,例如 fread(),但无济于事。
【问题讨论】: