title: Factor function in R returning NAs
body: <p>I have a data frame with a column of 'months' and coordinating values. When I create a graph, the months are ordered alphabetically. I want to order the months using the factor function, but now my graph is only showing the month of May and 'NAs'. </p>
  
  <pre><code>xnames&lt;-c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
  Data$Month&lt;-factor(Data$Month, levels = xnames)
  ggplot(DAtaTidy_MergeRWPeaks2, (aes(x=factor(Month, xnames), y=Volume)), na.rm=TRUE) + 
      geom_bar() 
  </code></pre>
  
  <p>I tried embedding the factor in the ggplot function but it produced the same result. When I delete 'May' from 'xnames', the graph just shows NAs.</p>
  
  <p><a href="https://i.stack.imgur.com/1OreG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1OreG.png" alt="enter image description here"></a></p>