I haven't tested this, but what about:

df <- data.frame(mtch=c(matchString, string1, string2))

grep(searchString, df$mtch, ignore.case=FALSE)

Depending on what your next step is, you might prefer grepl.


Sometimes using fixed=TRUE in grep() helps.

-Don

-- 
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062





On 8/12/15, 8:51 AM, "R-help on behalf of Kevin Kowitski"
<r-help-boun...@r-project.org on behalf of k.kowit...@icloud.com> wrote:

>>df<-as.data.frame(c(matchString, string1, string2))
>>df
>                                                         c(matchString,
>string1, string2)
>1 09:11:57.259 - Assay File Processing Thread - INFO -
>SolenoidCycleMessage: Addr = 0x03
>2                 
>23:12:43.22 - Test
>3                 
>           test
>>grep(searchString, df, ignore.case=FALSE)
>i

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to