So I have multiple (in my case exactly 2, but this may vary) observations per 'group' and want to convert this info to a single observation as shown below. Maybe I miss something obvious here but how to convert
type value
group
A 1 0.3
A 2 0.1
B 3 0.2
B 1 0.1
into
type1 value1 type2 value2
group
A 1 0.3 2 0.1
B 3 0.2 1 0.1