8
read.csv警告“带引号的字符串内的EOF”会阻止文件的完全读取
我有一个CSV文件(24.1 MB),无法完全读入R会话。当我在电子表格程序中打开文件时,我可以看到112,544行。当我用R将其读入R时,read.csv只会得到56,952行和以下警告: cit <- read.csv("citations.CSV", row.names = NULL, comment.char = "", header = TRUE, stringsAsFactors = FALSE, colClasses= "character", encoding= "utf-8") Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : EOF within quoted string 我可以使用以下命令将整个文件读入R readLines: rl <- readLines(file("citations.CSV", encoding = "utf-8")) length(rl) [1] 112545 但是我无法将其作为表格返回到R中(通过read.csv): …
125
r
csv
eof
read.table