title: Sorting a table by one column in R
body: <p>I have this table:</p>
  
  <pre><code>head(tb)
      shot_made_flag
  opponent        0        1
      ATL 54.79452 45.20548
      BKN 60.00000 40.00000
      BOS 58.87612 41.12388
      CHA 56.40000 43.60000
      CHI 56.97674 43.02326
      CLE 56.03113 43.96887
  </code></pre>
  
  <p>And this is my code:</p>
  
  <pre><code>table(opponent,shot_made_flag)
  rowSums(table(opponent,shot_made_flag))
  b&lt;table(opponent,shot_made_flag)/rowSums(table(opponent,shot_made_flag))*100
  head(tb)
  </code></pre>
  
  <p>I would like to sort my table by values in column 1, but I never get the table back as a result. I only get the values in column 1 sorted in crescent (or decrescent order)</p>