title: Ordering factors in number order for ggplot
body: <p>It was suggested that this is a duplicate from 
  <a href="https://stackoverflow.com/questions/38131596/ggplot2-geom-bar-how-to-keep-order-of-data-frame">ggplot2 geom_bar ... how to keep order of data.frame</a></p>
  
  <p>The difference is that the post in that my categorical variables are actually numbers as factors where that post uses strings.  When I use that solution, my numbers still do not plot in numeric order. </p>
  
  <p>I've ran a GLM model with numbers that are actually brought in as factors.  They are brought in this way because the first four numbers are actually dummy variables for a class and the rest are actual numbers.  I would like to plot these factors in number order though.  Is there a way to do this?  The problem can be produced with the code below:</p>
  
  <pre><code>library(ggplot2)
  
  x &lt;- c("1", "2", "3", "4", "100", "250", "350", "450")
  y&lt;- (1:8)
  df &lt;- data.frame(x, y)
  
  ggplot(df, aes(x = x, y = y)) +
    geom_bar(stat = "identity")
  </code></pre>
  
  <p>I have looked at the following posts:
  <a href="https://stackoverflow.com/questions/32349514/keeping-order-for-ggplot-bar-chart-in-r">Keeping order for ggplot bar chart in R</a></p>
  
  <p><a href="https://stackoverflow.com/questions/32278101/variables-order-for-ggplot">Variables order for ggplot</a></p>
  
  <p><a href="https://stackoverflow.com/questions/44710564/data-frame-variable-order-for-ggplot">Data frame variable order for ggplot</a></p>