[R] grep function with patterns list...

Martin Maechler maechler at stat.math.ethz.ch
Tue Oct 17 12:13:21 CEST 2006


>>>>> "Anupam" == Anupam Tyagi <AnupTyagi at yahoo.com>
>>>>>     on Mon, 16 Oct 2006 18:15:06 +0000 (UTC) writes:

    Anupam> Hi Stephane,
    Anupam> Stéphane CRUVEILLER <scruveil <at> genoscope.cns.fr> writes:
    >> is there a way to pass a list of patterns to the grep function? I
    >> vaguely remember something with %in% operator...

    Anupam> I think you are looking for the %in% and %nin% which
    Anupam> are part of Design package, and also in Hmisc
    Anupam> library. You have to install and load these packages
    Anupam> to access these functions.

Hmm,  '%in%' has been part of standard R for years ...
Martin



More information about the R-help mailing list