How to specify headers for tableGrobs in grid.arrange (from gridExtra)?

It appears that grid.arrange() ignoring the name tableGrob attribute. Let them say that I want to draw tables with names ...

 baz<-lapply(seq(3),function(ii) tableGrob(format(matrix(runif(8),nrow=2, dimnames=list(LETTERS[1:2],letters[1:4])),digits=3), name=paste0('n',ii))); 

This displays them, but without headers: do.call(grid.arrange,c(baz,nrow=1))

It seems that an unnecessary joke is twisted by creating lists of textGrobs, calculating their height, etc. I just want to force an extra line above the heading of each table, displaying the name I gave to this table. Or some kind of built-in argument for this.

+4
source share

All Articles