我有一个大的txt(400MB)文件,列由###
而不是,
或;
分隔。
我试过的是其中之一
raw2 <- readLines("myfile.txt")
raw2 <- gsub("###", "|", raw2)
raw3 <- read.table("raw2.txt", header = FALSE, sep = "|")
但我一直在获取:
Warning message:
In scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
EOF within quoted string
是否有一些推荐的有效方法来阅读长桌?
即使这似乎是Technique for finding bad data in read.csv in R的重复,我的情况是我无法做最大的逻辑事情,因为它会使用sep = "###"
,因为它会返回此错误
invalid 'sep' value: must be one byte