Skip to content
Prev 165293 / 398506 Next

Globbing Files in R

On Sun, Dec 21, 2008 at 9:35 AM, Gundala Viswanath <gundalav at gmail.com> wrote:
The tools to do this are the functions list.files, grep (or variants
on grep) and perhaps glob2rx.  See the help files for each.

One approach is
[1] "notes312.txt" "stat324.txt"

Note that grep returns a vector of indices into the character vector,
not the character vectors themselves.