Re: [R] Median in Classes

From: Dimitris Rizopoulos <dimitris.rizopoulos_at_med.kuleuven.ac.be>
Date: Mon 21 Mar 2005 - 21:13:08 EST

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


> Hello,
>
> I've got a problem to find an effective calculation.
> There are x,y data and I want to build classes for
> the x values. For each class then I want to calculate
> the median, N%-Quantiles, outliers, etc. for the
> corresponding y values and store all in a vector or matrix.
>
> Is there a direct possibility to do this without
> storing to much temporary data?
>
> Thank's in advance,
>
> Michael Hecht
>
> -------------------------------------------------
> | Dipl.-Math. Michael Hecht
> | 66748 Dillingen / Germany
> | E-Mail : mailto:michael.hecht@dillinger.de
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Mar 21 21:22:13 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:51 EST