A can make a unique image with 4 graphs using a code like:
g1<-ggplot( data1, aes(x=data1$dados ) ) + ...
g2<-ggplot( data2, aes(x=data2$dados ) ) + ...
g3<-ggplot( data3, aes(x=data3$dados ) ) + ...
g4<-ggplot( data4, aes(x=data4$dados ) ) + ...
grid.arrange(g1, g2, g3, g4, nrow=2, ncol=2)
and get something like the image below:
However, I would like to automatize the number of graphs in the image without having to add another variable for each new graph. Is it possible to construct images from a "vector of graphs", instead of telling variable names for grid.arrange( g1, g2, ..., gn, nrow=x, ncol=y)
?