Use reorder ---- # boxplot with increasing order of medians s2<-with(InsectSprays,reorder(spray,count,median)) with(InsectSprays,boxplot(count~s2))
# boxplot with decreasing order of medians s2<-with(InsectSprays,reorder(spray,-count,median)) with(InsectSprays,boxplot(count~s2)) John Talloen, Willem wrote-- >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 > -- ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
