Something similar like here (c#):
I have tried package gridExtra and function tableGrob and grid.arrange. They create nice (e.g. png) images out of data.frames but I haven't found a way to merge cells using them.
My goal is create table images I can embed using knitr and markdown.
EDIT per Thomas K's comment:
p1 <- gridExtra::tableGrob(1)
nf <- matrix(c(2,3,1,1), byrow=TRUE, nrow=2)
grid.arrange(p1,p1,p1, layout_matrix = nf)
EDIT per bdecaf's comment:
require(pander)
a <- array(1:8, dim = c(2,2,2), dimnames= rep(list(letters[1:2]),3))
pander(ftable(a))
This gives a usable solution!
**It seems this is a duplicate of: