Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 1 did not ha

一开始分析数据就开始各种bug~好哒,继续记录

导入数据的时候,出现

Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 11 elements

发现是因为第一行数据里面出现了空格,用连接符“-”也不可以
在这里插入图片描述
去掉就好啦~

你可能感兴趣的:(R,经验分享)