On Wed, Jun 2, 2010 at 12:37 AM, baptiste auguie <baptiste.aug...@googlemail.com> wrote: > Please do read the posting guide, in particular regarding reproducible > examples. > > You can use a Grid layout to place the lattice plot and a table in the > same page. For example, > > library(lattice) > library(coda) > library(gridExtra) > x <- matrix(runif(2200),ncol=22) > m <- as.mcmc(x) > p = xyplot(m, layout = c(2, 11)) > > pdf(,height=15) > arrange(p, tableGrob(as.matrix(summary(iris)), theme=theme.white()), > heights= unit(c(3,1),"null")) > dev.off()
Something like this should also work, except that the grob produced by tableGrob() doesn't seem to know its height. splom(iris, sub = tableGrob(as.matrix(summary(iris)), gp=gpar(cex = 0.5))) A quick alternative using lattice::draw.key() is tableKey <- function(x) { key <- list() for (i in 1:ncol(x)) { labels <- c(colnames(x)[i], x[,i]) font <- c(2, rep(1, nrow(x))) key <- c(key, list(text = list(labels, font = font))) } draw.key(key, draw = FALSE) } splom(iris, sub = tableKey(as.matrix(summary(iris)))) -Deepayan ______________________________________________ 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.