Skip to content
Prev 307067 / 398506 Next

Calculating the mean in one column with empty cells

On 05-10-2012, at 11:27, fxen3k wrote:

            
No data ==> no can answer question.

What did you expect?
What did Excel give you?

But you are trying to calculate the mean of  dataSet2$ac_60d_4d_after_ann and indexing with the indices of  non-NA numbers of  master$ac_60d_4d_after_ann.

mean(dataSet2$ac_60d_4d_after_ann, na.rm=TRUE) 

should do what you want.

Berend