[R] ordered boxplots

Dimitris Rizopoulos dimitris.rizopoulos at med.kuleuven.be
Thu Apr 27 10:53:37 CEST 2006


you could use the 'at' argument of boxplot(), e.g.,

y <- c(sapply(c(10, -5, -10, 5, 0), rnorm, n = 100, sd = 1))
gr <- gl(5, 100, labels = LETTERS[1:5])
boxplot(y ~ gr, at = rank(tapply(y, gr, median)))


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/(0)16/336899
Fax: +32/(0)16/337015
Web: http://www.med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Thomas Hoffmann" <thomas.hoffmann at uni-bonn.de>
To: <r-help at stat.math.ethz.ch>
Sent: Thursday, April 27, 2006 10:36 AM
Subject: [R] ordered boxplots


> Dear List-Members,
>
> I would like to produce a ordered boxplot in which the categories 
> with
> the smallest median are plotted at the left end and the box with the
> largest median at the right.
>
> Thanks in advance for any advices
> Thomas H.
>
> ______________________________________________
> R-help at 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
> 


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm




More information about the R-help mailing list