Re: [Rd] invert argument in grep

2006-11-12 Thread Romain Francois
Duncan Murdoch wrote: On 11/10/2006 12:52 PM, Romain Francois wrote: Duncan Murdoch wrote: On 11/9/2006 5:14 AM, Romain Francois wrote: Hello, What about an `invert` argument in grep, to return elements that are *not* matching a regular expression : R grep(pink, colors(), invert = TRUE,

Re: [Rd] invert argument in grep

2006-11-12 Thread Gabor Grothendieck
invert= would be consistent with the fact that egrep (-v), sed/vi (v) and awk (~!) all have special facilities as indicated to handle such negation/inversion. On 11/12/06, Romain Francois [EMAIL PROTECTED] wrote: Duncan Murdoch wrote: On 11/10/2006 12:52 PM, Romain Francois wrote: Duncan

Re: [Rd] invert argument in grep

2006-11-10 Thread Duncan Murdoch
On 11/9/2006 5:14 AM, Romain Francois wrote: Hello, What about an `invert` argument in grep, to return elements that are *not* matching a regular expression : R grep(pink, colors(), invert = TRUE, value = TRUE) would essentially return the same as : R colors() [ - grep(pink,

Re: [Rd] invert argument in grep

2006-11-10 Thread Prof Brian Ripley
On Fri, 10 Nov 2006, Duncan Murdoch wrote: On 11/9/2006 5:14 AM, Romain Francois wrote: Hello, What about an `invert` argument in grep, to return elements that are *not* matching a regular expression : R grep(pink, colors(), invert = TRUE, value = TRUE) would essentially return the same

Re: [Rd] invert argument in grep

2006-11-10 Thread Duncan Murdoch
On 11/10/2006 6:28 AM, Prof Brian Ripley wrote: On Fri, 10 Nov 2006, Duncan Murdoch wrote: On 11/9/2006 5:14 AM, Romain Francois wrote: Hello, What about an `invert` argument in grep, to return elements that are *not* matching a regular expression : R grep(pink, colors(), invert = TRUE,

Re: [Rd] invert argument in grep

2006-11-10 Thread Romain Francois
Duncan Murdoch wrote: On 11/9/2006 5:14 AM, Romain Francois wrote: Hello, What about an `invert` argument in grep, to return elements that are *not* matching a regular expression : R grep(pink, colors(), invert = TRUE, value = TRUE) would essentially return the same as : R colors() [ -

Re: [Rd] invert argument in grep

2006-11-10 Thread Duncan Murdoch
On 11/10/2006 12:52 PM, Romain Francois wrote: Duncan Murdoch wrote: On 11/9/2006 5:14 AM, Romain Francois wrote: Hello, What about an `invert` argument in grep, to return elements that are *not* matching a regular expression : R grep(pink, colors(), invert = TRUE, value = TRUE) would

[Rd] invert argument in grep

2006-11-09 Thread Romain Francois
Hello, What about an `invert` argument in grep, to return elements that are *not* matching a regular expression : R grep(pink, colors(), invert = TRUE, value = TRUE) would essentially return the same as : R colors() [ - grep(pink, colors()) ] I'm attaching the files that I modified