Message-ID: <51000E6C.9090303@gmail.com>
Date: 2013-01-23T16:23:08Z
From: Duncan Murdoch
Subject: to check if a character string is in a group of character strings
In-Reply-To: <419EED2318C2164DB95FBB20AA8810D802E70B@smtp_mail.bankofamerica.com>
On 13-01-23 11:14 AM, Yuan, Rebecca wrote:
> Hello,
>
> How can I judge if a string is in a group of string? For example, I would like to have
>
> if (subpool in pool){
> }else{
> }
if (subpool %in% pool)
Duncan Murdoch
>
> Where
>
>> pool = c("s1","s2")
>> subpool = c("s1")
>
> How can I write the "subpool in pool" right in R?
>
> Thanks very much!
>
> Cheers,
>
> Rebecca
>
>
> ----------------------------------------------------------------------
> This message, and any attachments, is for the intended r...{{dropped:5}}
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>