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