Here is a more clear example:
# Create the ftable object
oftable<-ftable(Titanic, row.vars = 4,col.vars=c(2,3))

require(gridExtra)

#Draw the grid, but the rows and heads are missing
grid.draw(tableGrob(oftable, 
                                show.csep=TRUE, show.rsep=TRUE, show.box=TRUE, 
separator="grey",
                                name="table2headrows"))

# I only can add 1 head and row labels
grid.gedit("table2headrows", cols=attributes(oftable)$col.vars$Sex, 
                rows=attributes(oftable)$row.vars$Survived,
                gpar.corefill = gpar(fill="white", col=NA),
                grep=TRUE, global=TRUE)
-- 
View this message in context: 
http://r.789695.n4.nabble.com/grid-table-with-head-of-two-rows-tp3219992p3224772.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to