Hello there,
I have a data set like this-
uid question c1 c2 c3
1 q1 2 3 6
1 q2 3 5 2
1 q3 4 5 3
2 q1 5 2 6
2 q2 3 6 2
3 q1 3 4 5
3 q2 3 5 2
3 q3 3 3 6
3 q4 4 5 2
But, I need it like this-
uid class q1 q2 q3 q4
1 c1 2 3 4 .
1 c2 3 5 5 .
1 c3 6 2 3 .
2 c1 5 3 . .
2 c2 2 6 . .
2 c3 2 3 4 .
3 c1 3 3 3 4
3 c2 4 5 3 5
3 c3 5 2 6 2
I have tried xpose, sxpose, reshape and stack.
How can I do it? Thanks in advance.
0 Response to Partially transpose/ reshape variable in dataset
Post a Comment