[R] ordering boxplots according to median
    John Wilkinson (pipex) 
    wilks at dial.pipex.com
       
    Wed Mar 22 18:55:53 CET 2006
    
    
  
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
>
--
    
    
More information about the R-help
mailing list