For the specified df, I was wondering how do I go about searching all fields in each row with the specified keywords and if there is a match on the same row regardless of which column then a new column will indicate "yes" and NA for mismatches. Thanks!
df <- data.frame(a = c("hi", "are", "you", "okay"),
b = c("I", "am", "okay", "thanks"),
c = c("how", "are", "you", "okay"))
keywords <- c("are", "you")
Desired results
df <- data.frame(a = c("hi", "are", "you", "okay"),
b = c("I", "am", "okay", "thanks"),
c = c("how", "are", "you", "okay"),
match = c(NA, "yes", "yes", NA))