Produce a table spanning multiple pages using kable()

前端 未结 1 1894
鱼传尺愫
鱼传尺愫 2020-12-10 12:17

I would like to produce a table that spans over multiple pages using kable(). I know this is possible using xtable() with the \"longtable\" option, but I need kable() for ot

相关标签:
1条回答
  • 2020-12-10 12:50

    You can try to use the kableExtra package. If you specify hold_position in kable_styling, you should be able to ping the table to the place you want.

    Also, in the current dev version, I introduced a new feature called repeat_header for longtable to repeat the header row on every page. You can check it out.

    kable(output, "latex", booktabs = TRUE, longtable = TRUE, caption = "Test") %>%
      kable_styling(latex_options = c("hold_position", "repeat_header"))
    
    0 讨论(0)
提交回复
热议问题