简体   繁体   English

read.table或read.csv无法加载其数据

[英]read.table or read.csv cannot load its data

I'm in trouble with importing csv data to R. csv is large scale of log data which has 50culumns and few million lines including header. 我在将csv数据导入R时遇到麻烦。csv是大规模的日志数据,其中包含50culumns和几百万行,包括标头。 I have 15 files and load some of them make issue. 我有15个文件并加载其中一些问题。

data<-read.table("1.csv",header=T,sep=',', stringsAsFactors = F, fill = T)

After that code, in usual 1.csv loaded to 'data' or give warning if 1.csv has problem. 在该代码之后,通常将1.csv加载到“数据”中,如果1.csv有问题则发出警告。 But in my case, nothing happen. 但就我而言,什么也没有发生。 After loading, there are no message and there is no object named 'data'. 加载后,没有消息,也没有名为“ data”的对象。

is anyone experienced like this? 有人有这样的经历吗?

Check this : 检查一下:

library(data.table)
fread('1.csv', header = T, sep = ',')

It's more efficient than read.table and maybe this is the main problem 它比read.table效率更高,也许这是主要问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM