gelu0
比方说,我想把格式如下的文件的2,3,5,6行读入,也就是skip seq(1,**,3)行。
11
1 22 33
3 33 11
22
2 22 33
3 44 55
出错了,如何解决呢?
d<-read.table("temp.txt",skip=c(1,4))
错误于scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
3行没有3元素
此外: Warning messages:
1: In if (skip > 0L) readLines(file, skip) :
条件的长度大于一,因此只能用其第一元素
2: In read.table("temp.txt", skip = c(1, 4)) :
readTableHeader在读取'temp.txt'时遇到了不完全的最后一行