I'm a bit desperate after hours of trying without any success. I have an ouput from R, but the tables are way too wide, having 31 columns. Is there anyway of automatically splitting the table? Maybe split in three parts and put together below each other? Thanks a lot for any answers!

edit: Hi, I put here code I played with, but not very much. The original is one of those, I can compile it without any errors in TeXStudio:

%latex.default(tstats <- rbind(tstats1, tstats2, tstats3), "tradestats.tex")%
\multicolumn{1}{l}{RSI $n=15, (70,30)$}&\multicolumn{1}{c}{Portfolio}&\multicolumn{1}    {c}{Symbol}&\multicolumn{1}{c}{Number of transactions}&\multicolumn{1}{c}{Number of     trades}&\multicolumn{1}{c}{Net Trading Profit Loss}&\multicolumn{1}{c}{Average trade Profit Loss}&\multicolumn{1}{c}{Median trade Profit Loss}&\multicolumn{1}{c}{Largest Winner}&\multicolumn{1}{c}{Largest Loser}&\multicolumn{1}{c}{Gross Profits}&\multicolumn{1}{c}{Gross Losses}&\multicolumn{1}{c}{Standard deviation trade Profit Loss}&\multicolumn{1}{c}{Percent Positive}&\multicolumn{1}{c}{Percent Negative}&\multicolumn{1}{c}{Profit Factor}&\multicolumn{1}{c}{Avgerage Winning Trade}&\multicolumn{1}{c}{Median Winning Trade}&\multicolumn{1}{c}{Avgerage Losing Trade}&\multicolumn{1}{c}{Median Losing Trade}&\multicolumn{1}{c}{Average Daily Profit Loss}&\multicolumn{1}{c}{Median Daily Profit Loss}&\multicolumn{1}{c}{Standard deviation Daily Profit Loss}&\multicolumn{1}{c}{Annual Sharpe ratio}&\multicolumn{1}{c}{Maximal Drawdown}&\multicolumn{1}{c}{Profit To Maximum Drawdown}&\multicolumn{1}{c}{Average Win-Loss ratio}&\multicolumn{1}{c}{Median Win-Loss ratio}&\multicolumn{1}{c}{Maximum Equity}&\multicolumn{1}{c}{Minimal Equity}&\multicolumn{1}{c}{End Equity}\tabularnewline
RUT&RSI&RUT&$147$&$45$&$-152938$&$-1694.044$&$1501.0$&$25170$&$ -66450$&$188535$&$     -264767$&$15877.4407$&$62.2222$&$37.7777$&$0.7120$&$ 6733.3928$&$ 4334$&$-15574.5294$&$-10703.0$&$-1694.0444$&$1501$&$15877.4407$&$-1.6937$&$-188375$&$-0.8118$&$0.4323$&$0.4049$&$ 1802$&$-186573$&$-152938$\tabularnewline
GSPC&RSI&GSPC&$ 92$&$28$&$-296677$&$-6695.3214$&$7172.5$&$50523$&$ -91993$&$270323$&$ -457792$&$35639.5768$&$64.2857$&$35.7142$&$0.5904$&$15017.9444$&$11708.9999$&$-45779.2$&$-41431.5$&$-6695.3214$&$7172.5$&$35639.5768$&$-2.9822$&$-358495$&$-0.8275$&$0.3280$&$0.2826$&$10614$&$-347881$&$-296677$\tabularnewline

  • 2
    Welcome to TeX.SX! The code can't compile because it has at least two syntax errors. Of course 31 columns with very wide headers can't fit on any reasonable page size. – egreg Apr 28 '14 at 21:36
  • Note that the fact that TeX Studio produces a document does not necessarily mean there are no errors as it is almost certainly configured to continue in spite of errors if it possibly can. You can look at the console output or log or you can compile at the command line to catch such errors. – cfr Apr 28 '14 at 21:49
  • Hello, so would you have any suggestions? I am afraid even if I put abbrevs in the headers, the figures are too long themselves :( – Jan Sila Apr 28 '14 at 21:49
  • You need to use environments for large tables like yours, and also can rotate it and perhaps put it as a float object in a double page. We need a MWE not just the table. Let me search a question I made time before about it and maybe it can help you. – Aradnix Apr 29 '14 at 2:20
  • @JanSila We can't help you to design the tabular. Maybe it were a better solution to switch columns to rows. Or print it on two pages, beginning with an even page. Or turn it sideways (against clock) and print it over a number of pages. Whatever, make a design, then a MWE, and then ask. – Keks Dose Apr 29 '14 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.