title: Split xtable ouput into sub tables
body: <p>Have a question on using xtable with Sweave when there are multiple columns. A table I am working on has about 25 columns and 5 rows. The exact number of columns is not known as that is dynamic.</p>
  
  <p>When I run say,</p>
  
  <blockquote>
    <p>table1 &lt;- table (df$someField)</p>
  </blockquote>
  
  <p>I get a table that essentially exceeds the page length.</p>
  
  <pre><code>       ColA    ColB    ColC
  ---------------------------
  RowA   1       2       3   ......
  RowB   3       4       6   ......
  </code></pre>
  
  <p>If a do a xtable on this, and run it through Sweave,</p>
  
  <pre><code>xtable(table1, caption="some table")
  </code></pre>
  
  <p>it overflows.</p>
  
  <p>What I am looking for is something like,</p>
  
  <pre><code>       ColA    ColB    ColC
  ---------------------------
  RowA   1       2       3 
  RowB   3       4       6 
  
         ColD    ColE    ColF 
  ---------------------------
  RowA   11       9       34 
  RowB   36       8       65  
  </code></pre>
  
  <p>with the \hline etc markups. Basically, split the xtable into parts by say 5 columns per "sub-table".</p>
  
  <p>I am also running this in a batch job, so I won't be able to make changes to individual files, whatever the solution it has to be able to be generated by running Sweave on the Rnw file.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Regards,</p>
  
  <ul>
  <li>Raj.</li>
  </ul>