Dear R-help mailing list,
I have the following types of data
long form
a<- ID Y
1 3
1 4
1 5
2 3
2 1
2 4
the broad form data is
e<- e0 e1 e2 e3
3 1 3 4
3 2 3 4
I want to combine them as follows (neglecting totally e0)
k<- ID Y Y+e
1 3 Y11 +e11= 3+1
1 4 Y12 + e12 = 4+3
1 5 Y13 + e13= 5+4
2 3 Y21 + e21 = 3+2
2 1 Y22 + e22 = 1+3
2 4 Y23 + e23 = 4+4
Thanks
regards
Emmanuel
[[alternative HTML version deleted]]