r - Placing data frames right after each other in a pdf -


i have list of matrices data.list , i'm trying display them on pdf right after 1 another, titles. elements of list indexed elements of list called row.vector.

here's code:

pdf("data.pdf", height = 11, width = 8.5) (i in 1:length(row.vector)) {     grid.arrange(tablegrob(data.list[[row.vector[[i]]]], gp=gpar(fontsize=6)), main = row.vector[[i]]) } dev.off() 

there 2 problems this. - matrices displayed on separate pages, despite fact none of them big enough warrant page. want them displayed right after another. - titles @ top of page , want them right on table. want put graphs in, displayed in between tables (no tables or graphs next each other horizontally).

here test lists:

row.vector <- list("first", "second", "third") <- matrix(nrow = 4, ncol = 3) a[1,] <- c(3,4,5) a[2,] <- c(6,7,8) a[3,] <- c(1,1,1) a[4,] <- c(1,1,1) b<- matrix(nrow = 2, ncol = 3) b[1,] <- c("a","x","y") b[2,] <- c("d","d","d") c <- matrix(nrow = 10, ncol = 2) c[,1] <- 1:10 c[,2] <- 11:20 data.list <- list("first" = a,"second"=b,"third"=c) 


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -