I have a data frame that looks like this:
trialcode response block
AM2A3 0 1
Empathy 1 1
ToM 4 1
Transfer 2.5 1
AM2D1 0 2
Empathy 4 2
ToM 2 2
Transfer 6 2
AM4M1 0 3
Empathy 6 3
ToM 6 3
Transfer 10 3
In each block, the first row defines the trial condition and the following three rows are my dependent variables. I would like to restructure it to look like this:
Empathy ToM Transfer condition block
1 4 2.5 AM2A3 1
4 2 6 AM2D1 2
6 6 10 AM4M1 3
Can anybody help? Thank you!