This is more an extended comment than a solution, but exists to explain why part 1 of the question is quite difficult at the moment---
1 at least is actually very difficult and, as chance would have it, is discussed by Paul Murrell in the latest issue of the R Journal (PDF).
The problem boils down to this:
R> grid.table(df, show.rownames=FALSE, show.colnames=FALSE)
R> grid.ls()
GRID.table.1
At this point, grid.table()
has created a table
grob, which only gets completed with grobs that form the actual table at draw time. This is achieved via an appropriate drawDetails()
method for the. But until the table is actually drawn, there is no way to edit the individual grobs that are used to draw the table; they don't exist yet.
R versions >= 3.0.0 introduced some new functions and a new way of working that would allow what you want, but grid.table()
would need to be changed to use the new functionality in the grid package. Effectively this would boil down to writing a makeContent()
method for the table
grob, which could then be forced using grid.force()
to populate it with the individual grobs need to draw the table. At that point you'd be able to use grid.edit()
to make "Size" and "cm" bold.