fread EOF instead of separator

天涯浪子 提交于 2019-12-01 12:05:06

I'm not 100% sure what the error is in your data, here, but try running the code with

data = fread(input = "../data.txt", sep = "\t", fill = TRUE)

in the fread options. I had a similar error, and it seemed that fread was having trouble identifying my column separation. Setting fill to true allows fread to fill in any missing data- at least then you can check the resulting data frame and find out where the weirdness is.

Sagar Neel De

Add fill = TRUE in the syntax

What's happening: The rows in the data have unequal length. With this syntax, blank fields are implicitly filled.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!