title: How to transpose a table in an R markdown document?
body: <p>Suppose I print a data frame called summary_table as follows:</p>
  
  <pre><code>summary_table = data.frame(a=c(1,2,3), b=c(11,12,13),c=c(21,22,23),d=c(31,32,33),e=c(41,42,43),f=c(51,52,53),g=c(61,62,63),h=c(71,72,73),i=c(81,82,83),j=c(91,92,93),k=c(101,102,103),l=c(111,112,113))
  
  print(xtable(summary_table,
           align=rep("r",13),
           caption="A summary of stuff."),
    table.placement="H")
  </code></pre>
  
  <p>Now suppose summary_table has only three rows, but twelve columns.  I'd like to flip (transpose) the table so that the columns become rows.</p>
  
  <p>Any easy way?</p>