I have a monthly excel spreadsheet with the following:
Category | Description |
---|---|
A | free text in paragraph form |
B | free text in paragraph form |
C | free text in paragraph form |
B | free text in paragraph form |
B | free text in paragraph form |
A | free text in paragraph form |
I would like to add a third column that adds tags or keywords from a predetermined list that searches the free text and then pre-populates it based on whether one or more of the terms is found there or not.
So for example a list of tags could be price, distance, availability, location, and so on with the Keywords or Tags column populated based on the free text in the second column as below
Category | Description | Keywords or Tags |
---|---|---|
A | Really doesn't like the price and location is too far | price, location |
B | The distance is an issue and not too much availability | Distance, availability |
C | Location is close so I like the convenience | location, convenience |
B | The distance is near and there is a lot of availability | availability, distance |
As shown above, the tags would be separated by commas.
The issue is that the list of predetermined keywords is large (around 20 to 30 tags).
My Questions:
What would be the most efficient way to create this list without removing any tags?
Also, is there a way to do this in RStudio?