Skip to content
Prev 67210 / 398502 Next

apply

try,

apply(sdata, 2, mean, na.rm=TRUE)

or

# assuming `sdata' is a matrix
colMeans(sdata, na.rm=TRUE)

I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
     http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "malte" <jan.wiener at tuebingen.mpg.de>
To: <r-help at stat.math.ethz.ch>
Sent: Thursday, April 07, 2005 2:27 PM
Subject: [R] apply