I have some relatively simple code to create a table for printing to a PDF:
library(gridExtra)
df <- head(iris)
tableGrob(df, gp = gpar(fontsize = 8), row
I've just remembered that the formatting parameters get recycled (but only with a sane logic after version >=2.2.0), so you can do,
library(gridExtra)
library(grid)
t1 <- ttheme_default(core=list(
fg_params=list(fontface=c(rep("plain", 4), "bold.italic")),
bg_params = list(fill=c(rep(c("grey95", "grey90"),
length.out=4), "#6BAED6"))
))
grid.newpage()
grid.table(iris[1:5, 1:3], theme=t1)