[R] pipe
ggrothendieck@yifan.net
ggrothendieck at yifan.net
Sun Mar 24 19:32:57 CET 2002
[this msg was first bounced and the manually approved;
don't capitalize "xxx": it looks too much like a word
used in a particular kind of spam. Your list maintainer, MM]
I would like to read in a .csv file ignoring all lines
before the header line. I am counting on the header
line being the first line that has xxx in it. I don't
know how many lines to skip prior to that line, otherwise
I would use the skip= feature of read.csv.
This is sort of what I would like to do, although I gather
this is not real R since I tried it without success:
my.table <- read.csv("gawk '/xxx/{++z};z' myfile.csv |")
The gawk program prints out only those lines starting from
the first line containing xxx.
I have played around with pipe() but could not get anything
to work.
I am using R 1.4.1 on Windows 2000.
Any ideas on how to accomplish this?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list