I have an R dataframe that looks like this:
ID number Code
D001 F11
D001 F12
F002 D13
F002 F11
E003 C12
And I want to convert into a dataframe like this with counts for each code per ID (key):
ID number F11 F12 D13 C12
D001 1 1 0 0
F002 1 0 1 0
E003 0 0 0 1