Skip to content
Prev 315424 / 398503 Next

read tab delimited file from a certain line

Hello,

Read the file using readLines, then grep "^year". You can then use a 
textConnection to read.table:

x <- readLines(con = textConnection(
"informations (unknown count of lines)
... and at some point the table
------
year month mday value
2013 1 16 0 "))

# This is it
i <- grep("^year", x)
read.table(textConnection(x[i:length(x)]), header = TRUE)


Hope this helps,

Rui Barradas

Em 16-01-2013 14:17, Christof Klu? escreveu: