I'm relatively new to R and got stuck with the following problem:
I have this vector:
condition<-c('hello','hi','bye', 'see you', 'Good morning')
The value of this vector should be inserted into the column test_condition if it is contained in the column sentence in the same row.
this would be the data frame
sentence<-c('hi,whats going on','hello, how r you','next','Nice, see you tmrw','Good morning dear')
df<-as.data.frame(sentence) %>%
add_column(test_condition=NA)
and this is what the result would look like

Does someone know how to solve this?