[R] Calculate Mean of Column Vectors?

Thomas Hopper thopper106035 at comcast.net
Tue Jan 11 12:08:27 CET 2005


Many helpful replies; my thanks to all of you!

colMeans() or the apply() function were what I was looking for (though 
the looping functions will surely come in handy elsewhere).

On Jan 10, 2005, at 11:03 PM, Marc Schwartz wrote:
> # get the column means
> z <- colMeans(y)
>
Best regards,

Tom




More information about the R-help mailing list