I have the data as:
z V1
1: 1 NA
2: 1 NA
3: 1 NA
4: 1 NA
5: 2 8.369040
6: 2 7.471732
7: 2 11.693667
8: 2 19.904610
9: 41 40.453627
10: 41 37.244842
11: 41 38.539745
12: 41 20.026698
13: 74 12.406808
14: 74 12.921079
15: 74 15.804546
16: 74 17.347516
.
.
.
What I want is this:
z V1.1 V1.2 V1.3 V1.4
1: 1 NA NA NA NA
2: 2 8.369 7.47 11.69 19.90
.
.
I want to have z values as columns but their corresponding z value should stay still.
How can I do this?