I am new to PERL and I am not a regular programmer. I need help in trying to sum, and also find averages.
I have data as shown below
0 4/2/2007 6:00:15 21615 62 2 2 4
1 4/2/2007 6:00:55 21655 60 2 2 4
2 4/2/2007 6:01:15 21675 65 20 3 4
3 4/2/2007 6:02:15 21735 65 20 3 4
4 4/3/2007 6:00:00 21600 65 20 3 4
5 4/3/2007 6:00:15 21615 62 2 2 4
6 4/3/2007 6:00:55 21655 60 2 2 4
7 4/3/2007 6:02:15 21735 65 20 3 4
Cols 2, 3, and 4 are Date, time (in hours) and time (in seconds.
The result I want is the sum (col 6) and average (cols 5 and 7) for 2 minute intervals by day. The result should look like ...
0 4/2/2007 6:00:00 62.33 8 2.33
1 4/2/2007 6:02:15 65 20 3
2 4/3/2007 6:00:00 62.33 8 2.33
3 4/3/2007 6:02:15 65 20 3
Thanks in advance to anyone who can help me with this...