I'm trying to text mine social policy cases. Each case is in a row and I want to know how many of my cases refer to say Universal Credit or some new unknown issue. I'm starting with word frequencies.
I've got as far as getting my data into this format. Basically ID takes value 1,2 or 3 as there are three case studies. Word takes value of dog or cat.
dd <- read.table(text="ID Word
1 dog
1 cat
2 cat
2 cat
3 cat", header=TRUE)
I want a count of unique ID for each Word i.e there are three case studies that mention cats
Word Count
cat 3
dog 1
I'm not even sure if this is now a text mining question or whether it's some basic group or count question.