title: Sort (order) data frame rows by multiple columns
body: <p>I want to sort a data frame by multiple columns. For example, with the data frame below I would like to sort by column 'z' (descending) then by column 'b' (ascending):</p>
  <pre><code>dd &lt;- data.frame(b = factor(c(&quot;Hi&quot;, &quot;Med&quot;, &quot;Hi&quot;, &quot;Low&quot;), 
        levels = c(&quot;Low&quot;, &quot;Med&quot;, &quot;Hi&quot;), ordered = TRUE),
        x = c(&quot;A&quot;, &quot;D&quot;, &quot;A&quot;, &quot;C&quot;), y = c(8, 3, 9, 9),
        z = c(1, 1, 1, 2))
  dd
      b x y z
  1  Hi A 8 1
  2 Med D 3 1
  3  Hi A 9 1
  4 Low C 9 2
  </code></pre>