Skip to content
Prev 66228 / 398503 Next

Median in Classes

you could try something like this:

dat <- data.frame(x=rep(1:4, each=25), y=rnorm(100))
tapply(dat$y, dat$x, summary)

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: "Hecht Michael, F+E/ST" <Michael.Hecht at dillinger.biz>
To: "'r-help at lists.R-project.org'" <r-help at stat.math.ethz.ch>
Sent: Monday, March 21, 2005 10:59 AM
Subject: [R] Median in Classes