Error in scan(file = file, what
2021-04-22 本文已影响0人
超级可爱的懂事长鸭
读取.txt文件遇到报错
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
line 159 did not have 15 elements
读取代码如下,可查看错误的行位置(会多一行)
a=read.table('文件名',header = T,fill = T)
一般是某一个单元格中间出现‘,’之类的分隔符,修改后重新读取即可