It's a bug; the package author clearly doesn't understand text justification in grid.
You can sort of fix it like so,
textii <- function(d, gp=gpar(), name="row-label-",
just="center", parse=TRUE){
x <- switch(just, "center"=0.5, "right"=1, "left"=0)
parseglobal <- parse
function(ii, parse=parseglobal){
lab <- if(parse) parse(text=d[ii]) else d[ii]
textGrob(x=x, label=lab, just=just, gp=gp, name=paste(name, ii, sep=""))
}
}
assignInNamespace("textii", textii, "gridExtra")
grid.table(z, core.just="left")
and/or adjust the padding.h
parameter to give more space. Sigh, what a mess.