Following up on this question, I have another example where I cannot use the accepted answer.
Again, I want to find each of the exact group elements in the
Try this from the stringr package. The "coll" option implements "human readable collation rules" which helps you match things that look identical, but for some reason, R resists matching them at first:
> library(stringr)
> str_detect(labs,coll(groups))
[1] TRUE FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE TRUE FALSE TRUE
TRUE FALSE FALSE
[16] TRUE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE