s-news
[Top] [All Lists]

Re: contain

To: "Dimitris Rizopoulos" <dimitris.rizopoulos@med.kuleuven.be>
Subject: Re: contain
From: Tim Hesterberg <timh@insightful.com>
Date: 7 Oct 2005 10:02:38 -0700
Cc: "Kleijn, H.J." <huubjan.kleijn@organon.com>, <s-news@lists.biostat.wustl.edu>
In-reply-to: <014501c5cb4e$5f2253e0$0540210a@www.domain> (dimitris.rizopoulos@med.kuleuven.be)
References: <51F7258847455048B583B29A02690D070ED6F0@ossms02.emea.pharma.intra> <014501c5cb4e$5f2253e0$0540210a@www.domain>
Either `grep' or `regexpr'.

In some versions of S+ `grep' is platform-dependent.  From help(grep):

grep calls the regexpr function, which uses a pattern matching
language (resembling the SunOS grep command) on all platforms and is
done in C code (not as a call to any operating system
command). Earlier versions of S-PLUS supplied a version of grep that
was different on different platforms. This version is still available
as oldGrep.

>look at ?grep(), e.g.,
>...
>
>>I have a very trivial question. Is there a function in Splus to 
>>identify
>>in a vector of strings those strings that contain a certain substring.

Tim Hesterberg


<Prev in Thread] Current Thread [Next in Thread>
  • contain, Kleijn, H.J. (Huub Jan)
    • Re: contain, Dimitris Rizopoulos
      • Re: contain, Tim Hesterberg <=