Hello, I'm new to R. I can't seem to pull elements in a column to make a counted data frame how many times the element appeared. Can someone help?
For instance:
I have two columns: timestamp and reaction.
In the reaction column, I have "LIKE","LOVE","HAHA","SORRY", and "ANGER".
I want to have all these counted and then set into a data frame with their perspective counts.
I think the function count from the dplyr package is what you are looking for. The code below (where d is your data.frame) will calculate the counts of each combinaiton of reaction and timestamp.