I am struggling to extract data from a table with a structure that is illustrated in the image below.
The table on top shows my current data structure, and the table on the bottom shows the final data structure I’d like to have after calculating means.
The part that I am struggling with is reaching an intermediate stage that would allow me to calculate means. At that stage the data should be transposed as shown below:
This is easy to do in excel for one participant, but /i have multiple participants in that structure, so I imagine a script would be much more efficient. The entire dataset has over 200 participants.
… the list goes on
Any help would be much appreciated.
2