Plot a data frame as a table

前端 未结 2 913
梦谈多话
梦谈多话 2020-12-08 10:44

I am moving away from Word/Excel tables and trying to generate a table in R. I have a data frame that I\'d like to simply print as a plot, while being able

2条回答
  •  难免孤独
    2020-12-08 11:35

    Try this. Yes use pdf() to plot a PDF file (e.g. mydf.pdf) or png() to plot a png file:

    library(gridExtra)
    pdf("mypdf.pdf", height=6, width=4)
    grid.table(x)
    dev.off()
    

    enter image description here

提交回复
热议问题