RE: [R] Preprocessing troublesome files in R - looking for some perl like functionality

From: Andy Bunn <abunn_at_whrc.org>
Date: Fri 03 Jun 2005 - 04:12:24 EST


> x <- readLines(...)
> tmp <- file()
> writeLines(x[substr(x, 83, 86) == "STD"], tmp)
> read.fwf(tmp, ...)

I wrapped this approach into function and it worked swimmingly. Thanks all. -Andy



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jun 03 04:18:55 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:21 EST