I have a dataframe that looks like this:
1 2 3 4 5
A B A B A
C B B B B
A C A B B
And I would like to summarize my data in a frequency table like this:
A B C
1 2 0 1
2 0 2 1
3 2 1 0
4 0 3 0
5 1 2 0
How would I be able to do this?