Displaying 1 result from an estimated 1 matches for "maketablegrobs".
2009 Sep 19
1
matrix operations on grobs and grid units
...c, lapply(seq(1, nrow), function(ii) {
max(u[matrix.indices[ii, ]])
}))
}
colMax.units <- function(u, ncol){ # colMax with a fake matrix of units
matrix.indices <- matrix(seq_along(u), ncol=ncol)
do.call(unit.c, lapply(seq(1, ncol), function(ii) {
max(u[matrix.indices[, ii]])
}))
}
makeTableGrobs <- function(e, ncol, nrow,
just = c("center", "center"),
gpar.text = gpar(col="black", cex=1),
gpar.fill = gpar(fill = "grey95", col="white", lwd=1.5)) {
n <- length(e) # number of labels
stopifnot(!n%%2) # only rectang...