calling grid.arrange on a list of ggplots
问题 This question is linked to this one here: Related post My present question is: In my code I generate a list of ggplots in a list by calling lapply. I use lapply in the first place because I execute a fairly big amount of similar ggplots and it would be too cumbersome to generate each ggplots manually. how can I generalize my code? p <- qplot(rnorm(30)) plist <- lapply(c(1:10),FUN=function(x){ qplot(rnorm(30)) }) #works year.plots <- list(p,p) do.call(grid.arrange, c(year.plots)) #works plist[