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
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
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
3 matches
Mail list logo