This is a version of my dataset
ID Name n Mean_SD q2 q1_q3 Range
1 A 1477 3.42(15.12) 0.8 0.4,1.9 0 - 343.7
1 B 1475 127.114 (668.781) 0.8 3.5,29.3 0.071 - 16013.2
2 A 445 3.35(20.41) 0.5 0.3,1.25 0.1 - 343.7
2 B 446 113.142(817.681 ) 1.7 0.775,6.225 0.1 - 9518
How do I transform this to a long-wide format like this
Name Summary 1 2
A n 1477 445
Mean_SD 3.42(15.12) 3.35(20.41)
q2 0.8 0.5
q1_q3 0.4,1.9 0.3,1.25
Range 0 - 343.7 0.1 - 343.7
B n 1475 446
Mean_SD 127.114 (668.781) 113.142(817.681 )
q2 0.8 1.7
q1_q3 3.5,29.3 0.775,6.225
Range 0.071 - 16013.2 0.1 - 9518
Please note the Id is transformed to Wide from Long ,
n Mean_SD q2 q1_q3 Range are transformed to long from wide.
Any suggestions much appreciated. Thanks in advance.