I guess "invert" does the trick. For recording ... example .. file <- grep("Repurchase Price",file, fixed = TRUE, invert = TRUE)
-----Original Message----- From: Santosh Srinivas [mailto:santosh.srini...@gmail.com] Sent: 14 October 2010 11:28 To: 'r-help' Subject: Drop matching lines from readLines Dear R-group, I have some noise in my text file (coding issues!) ... I imported a 200 MB text file using readlines Used grep to find the lines with the error? What is the easiest way to drop those lines? I plan to write back the "cleaned" data set to my base file. Thanks. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.