The output of data %>% select(Year, Type) %>% table() give me:
Year Type Freq
2001 A 5
2002 A 2
2003 A 9
... ... ...
2001 B 21
2002 B 22
2003 B 19
How I would like my data:
Year A B C D E
2001 5 21 .. .. ..
2002 2 22 .. .. ..
2003 9 19 .. .. ..
...
How can I achieve this? The examples I find don't seem to match my case