I am looking to reshape my data and aggregate it to "counts" similar to how a pivot table would work.
I have two columns: one with list of events and the second with attendees to an event (e.g.
event | attendee
birthday | Joe
birthday | Jane
birthday | Alex
wedding | Jane
wedding | Brad
etc.) I want to summarize it into one that counts up everything in column "attendee"
so that I can see
event | n_attendees
birthday | 3
wedding | 2
but for a larger set of data. How would you be able to condense it from the long format to a wide format in as few steps as possible while counting the second column? I can imagine how to do it on a pivot table in Excel, but I am having trouble reshaping it without having to list every event and count every list of attendees per event. My dataset is too large to do it like this.