Re: [R] to check if a character string is in a group of character strings

2013-01-23 Thread ONKELINX, Thierry
ns Yuan, Rebecca Verzonden: woensdag 23 januari 2013 17:15 Aan: R help Onderwerp: [R] to check if a character string is in a group of character strings 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{ } Where > pool =

Re: [R] to check if a character string is in a group of character strings

2013-01-23 Thread Yuan, Rebecca
Hello Duncan, Thanks for this! This works! Best, Rebecca -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Wednesday, January 23, 2013 11:23 AM To: Yuan, Rebecca Cc: R help Subject: Re: [R] to check if a character string is in a group of character

Re: [R] to check if a character string is in a group of character strings

2013-01-23 Thread Jose Iparraguirre
Hope this helps. José José Iparraguirre Chief Economist Age UK -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Yuan, Rebecca Sent: 23 January 2013 16:15 To: R help Subject: [R] to check if a character string is in a group of character str

Re: [R] to check if a character string is in a group of character strings

2013-01-23 Thread Duncan Murdoch
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 po

[R] to check if a character string is in a group of character strings

2013-01-23 Thread Yuan, Rebecca
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{ } Where > pool = c("s1","s2") > subpool = c("s1") How can I write the "subpool in pool" right in R? Thanks very much! Cheers, Rebecca ---