I would like to re-use a theme/template/default for a tableGrob
object from the gridExtra
package in r
.
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)
Notice, I do not want to have to repeat show.rownames = FALSE
and h.even.alpha = 0
multiple times. What is the appropriate way to create a theme or template of some type to avoid repeating these options over different calls to tableGrob
? Can I do this with a theme similar to ggplot2
or is a function my best bet?