Re: [R] list.files() find files beginning with a .

2012-07-08 Thread Bert Gunter
It's all documented in ?regexp. "." is a regex metacharacter. Metacharacters have to be escaped via "\\". In particular, note: "The fundamental building blocks are the regular expressions that match a single character. Most characters, including all letters and digits, are regular expressions th

Re: [R] list.files() find files beginning with a .

2012-07-08 Thread Prof Brian Ripley
On 08/07/2012 14:35, Uwe Ligges wrote: On 08.07.2012 14:47, syrvn wrote: Hello, when I use list.files with recursive = TRUE and all.files = TRUE, R returns a list of strings/paths. From all those strings I want to keep only the ones starting with a . I tried using grep to achieve that. Howe

Re: [R] list.files() find files beginning with a .

2012-07-08 Thread Uwe Ligges
On 08.07.2012 14:47, syrvn wrote: Hello, when I use list.files with recursive = TRUE and all.files = TRUE, R returns a list of strings/paths. From all those strings I want to keep only the ones starting with a . I tried using grep to achieve that. However, the problem is that because of the

[R] list.files() find files beginning with a .

2012-07-08 Thread syrvn
Hello, when I use list.files with recursive = TRUE and all.files = TRUE, R returns a list of strings/paths. >From all those strings I want to keep only the ones starting with a . I tried using grep to achieve that. However, the problem is that because of the recursive list.files parameter, for som