Re: [R] reading data from multiple files with multiple headers

2011-08-31 Thread Weidong Gu
If you know how many lines to skip, you can set skip=xx in read.table. The question is what you can do if you have variable lines to skip in various files but you have characters indicating the begining of the data, like ~A. What you can do is get the file in using readLines, use grep to find the

[R] reading data from multiple files with multiple headers

2011-08-30 Thread Julius Tesoro
Dear All, I have many files with a lot of headers and text at the beginning of the file. The headers are not uniform though and they contain different sizes Is there a way where I can read a table and skip all of the headers/text on top of it until I encounter a certain text pattern? Here is a