有没有办法增加tableGrob项目中列名的单元格?
library(grid)
d <- head(iris, 3)
g <- tableGrob(d)
grid.newpage()
grid.draw(g)
Run Code Online (Sandbox Code Playgroud)
默认:
任何帮助深表感谢。
您可以通过改变这样做padding的colhead范围内的theme。
例如
thm <- ttheme_default(colhead =
# first unit is the wdith, and second the height
list(padding=unit.c(unit(4, "mm"), unit(10, "mm"))))
tableGrob(d, theme=thm)
Run Code Online (Sandbox Code Playgroud)
要了解您可以更改的内容,您可以ttheme_default()在终端中查看