The trick is to use connection AND open it before read.table
:
con<-file('filename')
open(con)
read.table(con,skip=5,nrow=1) #6-th line
read.table(con,skip=20,nrow=1) #27-th line
...
close(con)
You may also try scan
, it is faster and gives more control.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…