Dear all, I just started using R today. What I need to do is find a text string in a (large) text file and than copy the some position related lines (or text) to an other text file. Is this possible with R?
Example: Search string is: "Date" write line of <search string> +0, +2, +6, +7, +8, +9 ######################################## 1 Report of measured data 2 - 3 Date: 01-10-03 4 5 Time: 17:52:23 6 ------------ 7 ====== 8 ++++++ 9 x1=1.5 10 y1=2.9 11 x2=29 12 y2=704 .. .. 552 Date: 01-10-03 553 554 Time: 18:04:11 555 ------------ 556 ====== 557 ++++++ 558 x1=1.1 559 y1=1.9 560 x2=35 561 y2=870 .. .. etc ######################################## The new text file must contain: ######################################## Date: 01-10-03 Time: 17:52:23 x1=1.5 y1=2.9 x2=29 y2=704 Date: 01-10-03 Time: 18:04:11 x1=1.1 y1=1.9 x2=35 y2=870 etc ######################################## Is this possible?? Kind Regards, Gerard [[alternative HTML version deleted]] ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help