If I have a table
ID C1 C2 C3 C4 C5
1
2 HD NS VM
3 DH FV
4 HD DH
Now I have to convert it to the following table
ID C
2 HD
2 NS
2 VM
3 DH
3 FV
4 HD
4 DH
What is the best way to make this conversion in R? This has to be done in R as part of a larger code?