Re: [R] regexpr syntax question

2008-10-01 Thread jim holtman
Do it in a two step process since you want the negation. x - c('file1.xyz', 'file2.xml', 'file3.abc') x[-grep(xml$, x)] [1] file1.xyz file3.abc On Wed, Oct 1, 2008 at 12:33 AM, zack holden [EMAIL PROTECTED] wrote: Greetings R list, I am stuck on a simple syntax problem. I want to list

[R] regexpr syntax question

2008-09-30 Thread zack holden
Greetings R list, I am stuck on a simple syntax problem. I want to list all files in a directory, excluding files of a certain type. I have tried pattern matching as follows: a - list.files(data, full.name = TRUE, pattern != .xml) # exclude all .xml files The warning returns that my