3

table output

I am trying to create a table to hold some basic information using Kable in RMarkdown that will be generated in HTML, PDF, and Word.

I have used pander function to do that and adjust some options such as split.table, split.cells, but it did not work out.

I also tried changing font size of the whole file by setting

classoption: a1paper fontsize: 3pt

Then the table becomes pretty small but 5 columns are still not in the same line. Besides, fontsize:3pt only changes the text size but the font size in the table does not change.

I just want the 5 columns of the data frame to be on the same line, any methods workable are welcome.

Bin
  • 517
  • 1
  • 4
  • 15
  • 2
    If using `pander`, I think you want to `panderOptions('table.split.table', Inf)` before rendering the markdown table then -- but hard to tell without a reproducible example. – daroczig Jan 12 '17 at 08:00
  • 1
    Hi daroczig, can you go to this link: http://stackoverflow.com/questions/42568024/create-pdf-format-table-that-can-wrap-the-text-well-in-rmarkdown. – Bin Mar 03 '17 at 17:59
  • I did tried panderOptions('table.split.table', Inf) in that example, but it did not work out. – Bin Mar 03 '17 at 18:00
  • 1
    `pander(data, split.cells = n)`, adjust n to suit your column width – landrower Mar 12 '21 at 21:19

0 Answers0