title: Reorder() not correctly reordering a factor variable in ggplot
body: <p>I'm baffled as to why the boxplots are not ordering in this plot:</p>
  
  <pre><code>set.seed(200)
  x &lt;- data.frame(country=c(rep('UK', 10), 
                            rep("USA", 10), 
                            rep("Ireland", 5)),
                  wing=c(rnorm(25)))
  
  ggplot(x, aes(reorder(country, wing, median), wing)) + geom_boxplot()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/YaWvH.jpg" alt="enter image description here"></p>
  
  <p>How can I order the boxplots based on highest-lowest medians (left to right)?</p>