boxplot(count~spray, InsectSprays) spray2 <- with(InsectSprays, factor(spray, levels=levels(spray)[order(tapply(count,spray,median))])) boxplot(count~spray2, InsectSprays)
Talloen, Willem [PRDBE] a écrit : >Dear R-users, > >Does anyone knows how I can order my serie of boxplots from lowest to >highest median (which is much better for visualization purposes). > >thanks in advance, >willem > > [[alternative HTML version deleted]] > >______________________________________________ >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