Hi,
I hope somebody can help me refining the awk code below. I use this code to unstack the following columns. It is relatively straightforward:patientnumber, time and observation columns
1 0 0
1 10 0
1 45 4
1 75 8
1 105 9
1 122 9
1 165 9
1 210 8
1 270 8
1 330 4
1 390 4
1 450 4
1 490 3
2 0 0
2...
Hi,
I need to reduce a dataset(1000 rows) to approximately 40 or 50 rows by averaging each 20 rows. Any help from the awk forum is appreciated. I have something like this:
0 4
2 6
3 8
4 10
. .
. .
. .
. .
998 15
999 12
1000 13
In the beginning of the data set I would like to...
Is there any possibility to unstack columns in awk using a grouping column?
Like this:
a 1
b 2
c 3
a 4
b 5
c 6
Unstacking above data should yield
a b c
1 2 3
4 5 6
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.