Create a PDF table

后端 未结 5 1130
庸人自扰
庸人自扰 2020-11-29 20:40

Is there a way to produce a PDF of a table from R in the same way you produce a plot (ie with pdf() or ggsave())? I realize there are ways with other programs (using sweave

5条回答
  •  半阙折子戏
    2020-11-29 21:18

    Here's a one-liner using my library:

    library(huxtable)
    my_table <- table(mtcars$gear, mtcars$cyl)
    quick_pdf(my_table) # produces a PDF in the current directory
    

提交回复
热议问题