#read.table( "E:/study/RData/newfile.txt") Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 2 did not have 2 elements 报错含义 第二行数据中不足2个元素 解决办法 查看原始数据,是否出现错误,将其修改,如去掉不正确的分隔符