xbmy has asked for the wisdom of the Perl Monks concerning the following question:
Hi everyone, I met a difficulty. The following data are fluxes' value of N2O emission, I want to calculate the average value of data in second column grouped by column one, because there are thousands of values for N2O-1 and N2O-2,N2O-3,N2O-4...... You know I am just a Perl newby, so can you show me the Perl code to solve the problem?
DATA:
The result of the calculation should be following data:N2O-1 0.02 N2O-1 0.47 N2O-1 0.22 N2O-2 0.02 N2O-2 5.87 N2O-2 7.32 N2O-3 3.45 N2O-3 1.81 N2O-3 2.36 N2O-3 4.70 N2O-4 9.60 N2O-4 4.95 N2O-4 6.99
I realy appreciated for your help! Thanks for your attention!N2O-1 0.297 N2O-2 4.403 N2O-3 2.54 N2O-4 7.18
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: HOW to calculate the column data
by ikegami (Patriarch) on Dec 03, 2009 at 21:04 UTC | |
by jwkrahn (Abbot) on Dec 03, 2009 at 21:18 UTC | |
by ikegami (Patriarch) on Dec 03, 2009 at 21:26 UTC | |
Re: HOW to calculate the column data
by Fletch (Bishop) on Dec 03, 2009 at 21:10 UTC | |
by jwkrahn (Abbot) on Dec 03, 2009 at 21:33 UTC | |
Re: HOW to calculate the column data
by lostjimmy (Chaplain) on Dec 03, 2009 at 21:09 UTC | |
Re: HOW to calculate the column data
by JadeNB (Chaplain) on Dec 03, 2009 at 21:02 UTC | |
Re: HOW to calculate the column data
by AnomalousMonk (Archbishop) on Dec 04, 2009 at 01:26 UTC | |
by xbmy (Friar) on Dec 04, 2009 at 15:46 UTC |
Back to
Seekers of Perl Wisdom