I have data that looks like this,
posture code HR EE a b
cycling A03 102 100 3 6
standingA03 99 99 4 6
sitting A03 98 67 5 5
walking A03 97 78 3 6
cycling B01 111 76 5 5
standingB01 100 88 4 4
sitting B01 78 34 4 3
walking B01 99 99 2 2
I need to transpose it so it will look like the following:
code cycling_HR cycling_EE cycling_a cycling_b standing_HR standing_EE standing_a standing_b sitting_HR sitting_EE sitting_a sitting_b walking_HR walking_EE walking_a walking_b
A03 102 100 3 6 99 99 4 6 98 67 5 5 97 78 3 6
B01 111 76 5 5 100 88 4 4 78 34 4 3 99 99 2 2
and so on (sorry for the formatting). I was not able to find appropriate answer to clarify the issue. Any assistance would be more that welcome.