I have a data frame as follows:
Z1 Z2 Y1 Y2 smpl
0.451 0.333 0.034 0.173 A
0.491 0.270 0.033 0.207 B
Columns Z1 and Z2 are multiple observations from the same sample. Same goes for Y1 and Y2.
I need to merge columns Z1 and Z2, and columns Y1 and Y2. yielding the following:
Z Y smpl
0.451 0.034 A
0.333 0.173 A
0.491 0.033 B
0.270 0.207 B
I am sure the solution is trivial, but... Well, I am a bit of a n00b, and hence I am also stuck. How can I do this?