以下是dput()
信息
structure(list(Text = c("bandwidth issues. issues with vpn",
"be more customer focussed reduce prices and offer same deas to existing customers that they use to attract new ones",
"be more helpful and provide a better service.", "better customer service",
"better customer service and products", "better customer service more transparency competency",
"better customer service uk based. greater reliability and customer support",
"better customer service. a more coherent ad that is better explained.",
"better customer services", "better customer services and they could be truthful"
)), .Names = "Text", row.names = c(NA, -10L), class = c("tbl_df",
"tbl", "data.frame"))
我希望根据filter
中的关键字vector
这些行。
这是我到目前为止所尝试过的,但不明白为什么它仍会带来另一个没有匹配的text
:
phrase = c("staff","agent","advisor","english","foreign","indian","gentleman","lady","man","woman","people","uk",
"speak","supervisor","manager","spoke","spoken","non-uk","representative","he","she")
phrase_match <- str_c(phrase, collapse = "|")
brand_nps_filtered%>%
filter(str_detect(Text, phrase_match))
正如您所看到的那样,be more customer focused reduce prices and offer same deas to existing customers that they use to attract new ones
phrase
没有关联的关键字