title: Sort boxplot by mean (and not median) in R
body: <p>I have a simple boxplot, showing the distribution of a score for factor TYPE:</p>
  
  <pre><code>myDataFrame = data.frame( TYPE=c("a","a","b","b","c","c"), SCORE=c(1,1,2,3,2,1) )
  boxplot( SCORE~TYPE, data=myDataFrame )
  </code></pre>
  
  <p>The various types are shown in the order they have in the data frame.
  I'd like to sort the boxplot by the <strong>mean</strong> of SCORE in each TYPE (in the example above, the order should be <code>a,c,b</code>).</p>
  
  <p>Any hint?</p>