[R] how to calculate mean into a list

2007-08-28 Thread Weiwei Shi
Dear Listers: I have this task and suppose a0 is a list of 10 data.frames, I want to calculate like this (a0[[1]]+a0[[2]]+..+a[[10]])/10 Thanks. -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. Did you always know? No, I did not. But I believed... ---Matrix III

Re: [R] how to calculate mean into a list

2007-08-28 Thread jim holtman
try: colMeans(do.call('rbind', lapply(a0, mean))) On 8/28/07, Weiwei Shi [EMAIL PROTECTED] wrote: Dear Listers: I have this task and suppose a0 is a list of 10 data.frames, I want to calculate like this (a0[[1]]+a0[[2]]+..+a[[10]])/10 Thanks. -- Weiwei Shi, Ph.D Research Scientist