Re: calculate average

2011-01-11 Thread John W. Krahn
Dr.Ruud wrote: On 2011-01-08 03:16, S.F. wrote: I have a data file with n columns and r row. The first 3 columns and the first 5 rows are: 2 3 1 1 6 X 4 0 X X 8 X 5 X 5 The "X" means missing. How could I write a script to calculate the average by column and replace "X" with the average? The

Re: calculate average

2011-01-11 Thread Dr.Ruud
On 2011-01-08 03:16, S.F. wrote: I have a data file with n columns and r row. The first 3 columns and the first 5 rows are: 2 3 1 1 6 X 4 0 X X 8 X 5 X 5 The "X" means missing. How could I write a script to calculate the average by column and replace "X" with the average? The output should be

Re: calculate average

2011-01-10 Thread John Delacour
At 18:16 -0800 07/01/2011, S.F. wrote: I have a data file with n columns and r row. The first 3 columns and the first 5 rows are: 2 3 1 1 6 X 4 0 X X 8 X 5 X 5 The "X" means missing. How could I write a script to calculate the average by column and replace "X" with the average? There must be

Re: calculate average

2011-01-10 Thread Brandon McCaig
On Fri, Jan 7, 2011 at 9:16 PM, S.F. wrote: > I have a data file with n columns and r row. > The first 3 columns and the first 5 rows are: > > 2 3 1 > 1 6 X > 4 0 X > X 8 X > 5 X 5 > > The "X" means missing. > How could I write a script to calculate the average by column and > replace "X" with the

calculate average

2011-01-09 Thread S.F.
Hi, I have a data file with n columns and r row. The first 3 columns and the first 5 rows are: 2 3 1 1 6 X 4 0 X X 8 X 5 X 5 The "X" means missing. How could I write a script to calculate the average by column and replace "X" with the average? The output should be like: 2 31 1 6

Re: Need help to calculate average value in hash

2004-10-20 Thread Gabor Urban
On Wed, 2004-10-20 at 01:57, Pete Tong wrote: > Hi All, > > > > I have file: > > Hi, show us some code fragments that seem not to work. Post well defined question. Gabaux -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Need help to calculate average value in hash

2004-10-20 Thread David le Blanc
On Wed, 20 Oct 2004 02:08:12 +0200, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > Pete Tong wrote: > > I have file: > > > > PHI: 15 > > CA: 32 > > NY: 14 > > PHI: 35 > > NY: 11 > > CA: 22 > > NY: 23 > > CA: 36 > > > > I need to put it into hash. Key â State, Value â Number (Average Value!!!) > >

Re: Need help to calculate average value in hash

2004-10-19 Thread Gunnar Hjalmarsson
Pete Tong wrote: I have file: PHI: 15 CA: 32 NY: 14 PHI: 35 NY: 11 CA: 22 NY: 23 CA: 36 I need to put it into hash. Key – State, Value – Number (Average Value!!!) So in output I should have: PHI:25 CA:30 NY:16 Thanks for letting us know about your needs. Out of curiosity, when will you start the c

Need help to calculate average value in hash

2004-10-19 Thread Pete Tong
Hi All, I have file: PHI: 15 CA: 32 NY: 14 PHI: 35 NY: 11 CA: 22 NY: 23 CA: 36 I need to put it into hash. Key – State, Value – Number (Average Value!!!) So in output I should have: PHI:25 CA:30 NY:16 - Do you Yahoo!? Yahoo! M