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), rows = NULL)
I'd like to make the last row the same format as the header row (bold, and darker gray background). I understand I can use gpar to control format of the entire table, but not sure how to just affect the last row.
Thanks!
You could edit the grobs, as suggested in the vignette
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,
One option is to create a new table, and merge the two together,