Hi all,
Can anyone help me to convert the following, which actually what I would like to get from the previous lines:
I have the file
1 6 8
1 1 9
2 6 14
2 1 14
4 6 5
I would like to get
1 9 0 0 0 0 8
2 14 0 0 0 0 14
4 0 0 0 0 0 5
So the first column is just a row number, the 2nd is the position of the 3rd column value; so 1 9 0 0 0 0 8 is the first row and there are two positions: 9 at position 1, and the other one is in position 6 with value 8.
Could you suggest some code or code part to do this.
Can anyone help me to convert the following, which actually what I would like to get from the previous lines:
I have the file
1 6 8
1 1 9
2 6 14
2 1 14
4 6 5
I would like to get
1 9 0 0 0 0 8
2 14 0 0 0 0 14
4 0 0 0 0 0 5
So the first column is just a row number, the 2nd is the position of the 3rd column value; so 1 9 0 0 0 0 8 is the first row and there are two positions: 9 at position 1, and the other one is in position 6 with value 8.
Could you suggest some code or code part to do this.