Hi colleagues,
I am just starting and want your help
How do I convert the following format of my data table to the one I can analyze? Thanks so much
My table looks like this
subject |
time |
variable |
value |
1 |
b |
A |
2 |
1 |
wk2 |
A |
5 |
1 |
wk6 |
A |
6 |
1 |
b |
B |
1 |
1 |
wk2 |
B |
1.5 |
1 |
wk6 |
B |
3 |
2 |
b |
A |
5 |
2 |
wk2 |
A |
6 |
2 |
wk6 |
A |
4 |
2 |
b |
B |
7 |
2 |
wk2 |
B |
8 |
2 |
wk6 |
B |
9 |
I want to convert to the following format
subject |
time |
A |
B |
1 |
b |
2 |
1 |
1 |
wk2 |
5 |
1.5 |
1 |
wk6 |
6 |
3 |
2 |
b |
5 |
7 |
2 |
wk2 |
6 |
8 |
2 |
wk6 |
4 |
9 |