Is there any version of grep that gets information from the filename?
For example:
x <- "myfile.txt"
y <- grep.file("my text", x)
should return in y the lines with my text.
I know that
x <- "myfile.txt"
y <- grep("my text", readLines(x))
will probably work, but maybe there's a more direct (and
less memory hungry) option.
Alberto Monteiro