title: Using custom order to arrange rows after previous sorting with arrange
body: <p>I know this has already been asked, but I think my issue is a bit different (nevermind if it is in Portuguese).
  I have this dataset:</p>
  
  <pre><code> df &lt;- cbind(c(rep(2012,6),rep(2016,6)),
           rep(c('Emp.total',
                 'Fisicas.total',
                 'Outros,total',
                 'Politicos.total',
                 'Receitas.total',
                 'Proprio.total'),2),
           runif(12,0,1))
  
  colnames(df) &lt;- c('Year,'Variable','Value)
  </code></pre>
  
  <p>I want to order the rows to group first everything that has the same year. Afterwards, I want the <code>Variable</code> column to be ordered like this:</p>
  
  <ol>
  <li>Receitas.total</li>
  <li>Fisicas.total</li>
  <li>Emp.total</li>
  <li>Politicos.total</li>
  <li>Proprio.total</li>
  <li>Outros.total</li>
  </ol>
  
  <p>I know I could use<code>arrange()</code> from <code>dplyr</code> to sort by the year. However, I do not know how to combine this with any routine using <code>factor</code> and <code>order</code> without messing up the previous ordering by year.</p>
  
  <p>Any help? Thank you</p>