I have something like that:
One Two
A,B,C A
A,C, Z
R,F, K
T T
And I would like to get in the 'Third' yes/no if 'Two' is contained in 'One'.
One Two Three
A,B,C A yes
A,C, Z no
R,F, K no
T T yes
I know I can get it by using grepl
, like that:
grepl("A" , all$One) -> all&Three
. But I have a few hundreds cases, so I am not able to write all those individual queries.
So how I should implement the whole 'Two' cell as a pattern in a grepl
function?