美文网首页
Error in scan(file = file, what

Error in scan(file = file, what

作者: 超级可爱的懂事长鸭 | 来源:发表于2021-04-22 13:31 被阅读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)
    

    一般是某一个单元格中间出现‘,’之类的分隔符,修改后重新读取即可

    相关文章

      网友评论

          本文标题:Error in scan(file = file, what

          本文链接:https://www.haomeiwen.com/subject/wfnxrltx.html