Re: [R] Read multiple text files and combine into single file?

2007-01-31 Thread jim holtman
I think something like this should work: outFile <- file("output.txt", "w") for (i in ListOfFileNames){ x <- readLines(i) writeLines(x[2:(length(x)-1)], outFile) } close(outFile) On 1/30/07, pif pif <[EMAIL PROTECTED]> wrote: > Hi everyone! > > I have 1000 text files that contain data i

[R] Read multiple text files and combine into single file?

2007-01-31 Thread pif pif
Hi everyone! I have 1000 text files that contain data in a standard format separated by semi colons. However, each file also has single header (first) and footer (final) lines. The text files are all named with a sample number, which do not follow a pattern. I need to delete the header and fo