Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法增加tableGrob项目中列名的单元格?
tableGrob
library(grid) d <- head(iris, 3) g <- tableGrob(d) grid.newpage() grid.draw(g)
默认:
我想要实现的目标(这是在 Photoshop 中完成的):
任何帮助深表感谢。
您可以通过更改 中的 来做到这padding一点。colheadtheme
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)
要了解您可以更改的内容,您可以ttheme_default()在终端中查看
ttheme_default()