I have the following data structure
ID Type Values
1 A 5; 7; 8
2 A 6
3 B 2; 3
and I would like to reshape it to the following using R:
ID Type Values
1 A 5
1 A 7
1 A 8
2 A 6
3 B 2
3 B 3
I’ve been trying to work out how to do it with plyr but without any success. What is the best way to do this?
Since you asked for a
plyrsolution, here you go: