read.csv()警告:无法读取R中的csv文件 [英] read.csv() warning: unable to read a csv file in R
本文介绍了read.csv()警告:无法读取R中的csv文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图读取一个csv文件在R和read.csv给我一个警告,从而停止阅读从那里。我认为这是一个有关的额外报价。如何解决这个问题?
I was trying to read a csv file in R and read.csv gives me a warning and consequently stops reading from there on. I think it's something related to an extra quote being there. How can I resolve this?
(csv文件放在公共共享下面供访问)
(csv file put on a public share below for access)
> scoresdf = read.csv('http://aftabubuntu.cloudapp.net/trainDataEnglish.csv')
Warning message:
In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
EOF within quoted string
推荐答案
我在 read.csv
上得到了相同的错误。我设法使它与 rio
:
I got the same error on read.csv
. I managed to get it working with the rio
package:
library(rio)
dat <- import("http://aftabubuntu.cloudapp.net/trainDataEnglish.csv")
和 readr
package:
library(readr)
dat <- read_csv("http://aftabubuntu.cloudapp.net/trainDataEnglish.csv")
和 data.table
package:
library(data.table)
dat <- fread("http://aftabubuntu.cloudapp.net/trainDataEnglish.csv")
这篇关于read.csv()警告:无法读取R中的csv文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文