Below is my dataset. I am using the function `strdetect()` on the `key` column like so.

`str_detect(mydata$Key, 'R')`

I want to be able to search for strings that contain 2 `R`'s. Obviously in the below example I could just search for `R002R009` but I do not always no the numbers attached to the `R`'s so I just want to search for strings with 2 `R`'s

I need to be able to use it inside an `ifelse` statement

```
 mydata[1:3]
           IDENTIFIER  DATE_TIME         X-VALUE     Y-VALUE      Key
    1      214461707   1/04/2019 8:25           1         -3       A001
    2      214461789   1/04/2019 10:16          1         -2       R001
    3      214461789   1/04/2019 10:16          1         -5       R002R009

```