CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Summing and Aggregating

 



ZamNeb
New User

Apr 8, 2009, 1:02 AM

Post #1 of 2 (562 views)
Summing and Aggregating Can't Post

I am new to PERL and need help with some data I am working with. I have a data set that looks like this

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 62 2 2 4
4 4/2/2007 6:02:55 21775 60 2 2 4
5 4/2/2007 6:02:55 21775 65 20 3 4
6 4/3/2007 6:00:15 21615 62 2 2 4
7 4/3/2007 6:00:55 21655 60 2 2 4
8 4/3/2007 6:01:15 21675 65 20 3 4
9 4/3/2007 6:02:15 21735 62 2 2 4
10 4/3/2007 6:02:55 21775 60 2 2 4
11 4/3/2007 6:02:55 21775 65 20 3 4

I want to get the total of values in col 6 every 2-minutes / day. I also want to get the average values for cols 5 and 7 every 2-minutes per day. The final result should look like

0 4/2/2007 62.3 24 2.3 4
1 4/2/2007 62.3 24 2.3 4
2 4/3/2007 62.3 24 2.3 4
3 4/3/2007 62.3 24 2.3 4

Note: cols 3 and 4 are time in h:m:s and in secs respectively. Thus 6:00:00 (col3) is 21600 (col4).

Thanks!


KevinR
Veteran


Apr 8, 2009, 8:03 AM

Post #2 of 2 (553 views)
Re: [ZamNeb] Summing and Aggregating [In reply to] Can't Post

What have you tried so far to solve your programming requirements?
-------------------------------------------------

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives