Very new to R and hoping for help.
I have a list of 1000 product names, and I have a list of 80 key words or phrases. I need to determine how many of the 1000 product names contain one or more of those key words or phrases.
Example: if one of the 1000+ product names was "honey bunches of oats" and one of the 80+ keywords is "honey", I need it to show up as TRUE in a new column next to "honey bunches of oats"
Uploaded both lists as csv files. I made a vector for each list, and tried to use the following:
str_detect(products, regex(".keywords.", ignore_case = TRUE))
This came back with all false results. I also tried to use grepl(keywords, products)
which returned zero results as well.
I am confident there should be instances where the keywords are contained within these strings. Is it looking for exact matches? I need it to show partial matches.