title: How to convert a table to a data frame
body: <p>I have a table in R that has <code>str()</code> of this:</p>
  
  <pre><code> table [1:3, 1:4] 0.166 0.319 0.457 0.261 0.248 ...
   - attr(*, "dimnames")=List of 2
    ..$ x: chr [1:3] "Metro &gt;=1 million" "Metro &lt;1 million" "Non-Metro Counties"
    ..$ y: chr [1:4] "q1" "q2" "q3" "q4"
  </code></pre>
  
  <p>And looks like this when I print it:</p>
  
  <pre><code>                    y
  x                           q1        q2        q3        q4
    Metro &gt;=1 million  0.1663567 0.2612212 0.2670441 0.3053781
    Metro &lt;1 million   0.3192857 0.2480012 0.2341030 0.1986102
    Non-Metro Counties 0.4570341 0.2044960 0.2121102 0.1263597
  </code></pre>
  
  <p>I want to get rid of the <code>x</code> and <code>y</code> and convert it to a data frame that looks exactly the same as the above (three rows, four columns), but without the <code>x</code> or <code>y</code>. If I use <code>as.data.frame(mytable)</code>, instead I get this:</p>
  
  <pre><code>                    x  y      Freq
  1   Metro &gt;=1 million q1 0.1663567
  2    Metro &lt;1 million q1 0.3192857
  3  Non-Metro Counties q1 0.4570341
  4   Metro &gt;=1 million q2 0.2612212
  5    Metro &lt;1 million q2 0.2480012
  6  Non-Metro Counties q2 0.2044960
  7   Metro &gt;=1 million q3 0.2670441
  8    Metro &lt;1 million q3 0.2341030
  9  Non-Metro Counties q3 0.2121102
  10  Metro &gt;=1 million q4 0.3053781
  11   Metro &lt;1 million q4 0.1986102
  12 Non-Metro Counties q4 0.1263597
  </code></pre>
  
  <p>I probably fundamentally do not understand how tables relate to data frames.  </p>