I would like to iterate over a dataframe and plot several graphs over several pages. For instance, an iteration over the dataframe will result in 20 plots. Since 20 plots in one page is too much (too many small plots) I would like to distribute them over 5 pages with each 4 plots.
I know how to create multiple plots on one page with :
par(mfrow=c(2,2))
-----------
Just keep plotting them. You will get additional pages after every four
plots. Now I know this is true when using PDF as the output device.
pdf("test_for_temp.pdf")
par(mfrow=c(2,2))
do plotting here
dev.off()
==========================
one plot for one page
pdf(...) # create the PDF device
for (i in 1:nFiles) plotMA(celdata[i],...) # make all the plots
dev.off() # close the devide.
==========================
Ref
https://r.789695.n4.nabble.com/multiple-plots-over-multiple-pages-td854616.html