Re: [R] proper use of textConnection

2008-10-12 Thread Gabor Grothendieck
Try one of these: Lines <- readLines("myfile.dat") Lines <- Lines[-grep("whatever", Lines)] DF <- read.table(textConnection(Lines), ...other.args...) or # use findstr /v instead of grep -v if you are on Windows DF <- read.table(pipe("grep -v whatever myfile.dat"), ...other.args...) On Sun, Oc

Re: [R] proper use of textConnection

2008-10-12 Thread Peter Dalgaard
Dennis Fisher wrote: Colleagues, Using R2.7.0 in OS X, I am having trouble understanding the command textConnection. My situation is as follows: 1. I am trying to read a lengthy file (45000 lines) that has headers ~ every 1000 lines. read.table (or its variants) fail because of the recu

[R] proper use of textConnection

2008-10-12 Thread Dennis Fisher
Colleagues, Using R2.7.0 in OS X, I am having trouble understanding the command textConnection. My situation is as follows: 1. I am trying to read a lengthy file (45000 lines) that has headers ~ every 1000 lines. read.table (or its variants) fail because of the recurrent headers. 2. My p