title: R: Change row order
body: <p>Assume a dataframe constructed like</p>
  
  <pre><code>df = data.frame(replicate(2,sample(0:10,2,rep=TRUE)))
  df = t(df)
  df
  </code></pre>
  
  <p>which returns something like</p>
  
  <pre><code>   [,1] [,2]
  X1    9    8
  X2   10    4
  </code></pre>
  
  <p>Here's the question: How can I change the order of rows so that:</p>
  
  <pre><code>   [,1] [,2]
  X2   10    4
  X1    9    8
  </code></pre>
  
  <p>? Thanks!</p>