2
我想在r
的gridExtra
包中重新使用tableGrob
對象的主題/模板/默認值。如何在r中的gridExtra主題tableGrob對象
library(gridExtra)
tableGrob(df, cols = c("Custom Name", "Custom Name2"),
show.rownames = FALSE, h.even.alpha = 0)
tableGrob(df2, cols = c("Different Name", "Different Name2"),
show.rownames = FALSE, h.even.alpha = 0)
通知,我不想再重複show.rownames = FALSE
和h.even.alpha = 0
多次。創建某種類型的主題或模板的適當方法是什麼,以避免在通過對tableGrob
的不同調用重複這些選項?我可以用類似於ggplot2
的主題來做到這一點,或者是我最好的選擇嗎?