title: Sort by Month and Year in Dataframe
body: <p>I'm having trouble sorting by month/year format in R.
  I have data in a <code>%m/%Y</code> format but in trying to use</p>
  
  <pre><code>df_prod&lt;-df_prod[order(as.Date(df_prod$date,format="%m/%Y")),]
  </code></pre>
  
  <p>The data frame is not sorting. I'm getting a text-like ordering (01/2000,01/2001,01/2002)</p>
  
  <p>Additional details:
  I'm performing an <code>dplyr</code> aggregation on a dataframe that was nicely sorted in <code>%m/%Y</code> format:</p>
  
  <pre><code>df_prod&lt;-df %&gt;%
    group_by(date,comp_id) %&gt;%
    summarise(a_prod=prod(1+TRT)-1)
  </code></pre>
  
  <p>Thank you</p>