This isn't a ggplot question, so please note that you're posting to
the wrong listserv. However, I would use readLines() to read the file
into a temporary variable. Then use grep to find that "%Counts" line
(assuming that it always prefixes the data lines you want). For
example, something like this:
temp <- readLines(fileNames[fileNumber], n=50) # assuming no more
than 50 header lines
lastHeaderRow <- which(grepl(temp, "%Count", fixed=TRUE)
mydata <- read.table(fileNames[fileNumber], skip=lastHeaderRow, sep=",")
Ben
> --
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example:
>
https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email
ggp...@googlegroups.com
> To unsubscribe: email
ggplot2+u...@googlegroups.com
> More options:
http://groups.google.com/group/ggplot2
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
ggplot2+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.