Sebastian,
There is rarely a completely free lunch, but fortunately for us R has
some wonderful tools
to make this possible. R supports regular expressions with commands
like grep(),
gsub(), strsplit(), and others documented on the help pages. It's
just a matter of
constructing and algorithm tha
Here is a way to do it. I assume that you data has each record on a
line; it came through the email as multiple lines.
> x <- readLines("/tempxx.txt")
> # remove '#Fields:" so it can be used as a header
> x <- sub("^#Fields: ", "", x)
> # remove comment lines
> x <- x[-grep("^#", x)]
> # remove
If I have a web log fileĀ as follows:
#Software: Microsoft Internet Information Services 5.0
#Version: 1.0
#Date: 2007-12-03 13:50:17
#Fields: date time c-ip cs-username s-ip s-port cs-method cs-uri-stem
cs-uri-query sc-status sc-bytes cs-bytes time-taken cs(User-Agent)
cs(Cookie) cs(Referer)
"2007
3 matches
Mail list logo