Frustrated newbie question in R:
Say I have a list of strings = ("a", "b", "c"), and a data frame with a column df$stuff.
I want to loop through each string in the list, count the number of times that string appears in df$stuff, and add it cumulatively. In other words, the number of times "a" appears, plus the number of times "b" appears, plus the number of times "c" appears. I've tried count, table, and aggregate functions, and all I get is errors.
There simply has to be a nice clean way of doing this.