One column of my data frame has words and phrases. I am trying to create a dummy variable for those fields within this column that have specific strings of text anywhere within the cell.
For example:
Y <- HIGH VOLUME CREATES NUISANCE TO EVERYONE.
X <-c("(hIGH,VOLUME)|(HIGH,VOLUME)|(LOW,VOICE)")
Here in X bracket comma(,)indicates AND condition.
I would want to identify all the fields with the string in AND , OR condition.
If there are both the words from these three word list then i want to put "VOLUME"in the additional column created.
I've tried a few things such as any() , which() and %in% but nothing has worked so far.
Any help greatly appreciated