I have a large dataset with 30k rows like below:
patno Inentorname
1001 A
1001 B
1002 A
1002 B
1003 C
1004 D
1004 E
What I want to get is like:
A B C D E
A 0 2 0 0 0
B 2 0 0 0 0
C 0 0 0 0 0
D 0 0 0 0 1
E 0 0 0 1 0
Is there any easy way to get this in R or python?