On 20 Jan 2003 at 17:46, Hedderik van Rijn wrote:
> x <- matrix(rnorm(60),20) > x[sample(1:60,10)] <- NA > apply(x,1,mean,na.rm=T) or simply colMeans(x,na.rm=T) > > On Monday, January 20, 2003, at 04:27 PM, Truc Truong wrote: > > > Hi: > > > > How do I find average across three columns such as weight1, weight2, > > weight3 (20 people, each person has three different measures)? They > > have NA's also. Thanks > > > > Tom, Univ of Pittsburgh, [EMAIL PROTECTED] > > > > ______________________________________________ > > [EMAIL PROTECTED] mailing list > > http://www.stat.math.ethz.ch/mailman/listinfo/r-help > > > > > -- > http://www.van-rijn.org > > ______________________________________________ > [EMAIL PROTECTED] mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help Petr Pikal Precheza a.s., Nabř.Dr.E.BeneÜe 24, 750 62 Přerov tel: +420581 252 257 ; 724 008 364 [EMAIL PROTECTED]; [EMAIL PROTECTED] fax +420581 252 561 ______________________________________________ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help