fork download
  1. df <- data.frame(sentence = c("Customer satisfaction index improvement", "reduction in retail cycle", "Improve market share", "% recovery from vendor"))
  2. words <- c("csi", "dsi", "market", "share", "improvement", "dealers", "increase")
  3. df <- cbind(df, yes = grepl(paste(words, collapse = "|"), df$sentence))
  4. df
Success #stdin #stdout 0.22s 60752KB
stdin
Standard input is empty
stdout
                                 sentence   yes
1 Customer satisfaction index improvement  TRUE
2               reduction in retail cycle FALSE
3                    Improve market share  TRUE
4                  % recovery from vendor FALSE