library(grid)
d <- head(iris,3)
g <- tableGrob(d)
grid.newpage()
grid.draw(g)
默认情况:
我想要实现的效果(这是用Photoshop完成的):
非常感谢任何帮助。
- KRStam
1个回答
5
5
你可以通过改变 theme 中 colhead 的 padding 来实现此操作。 例如:
thm <- ttheme_default(colhead =# first unit is the wdith, and second the heightlist(padding=unit.c(unit(4,"mm"), unit(10,"mm"))))
tableGrob(d, theme=thm)