Can anyone help me in relation to passing (or setting global) par
graphical parameters across chunks in knitr.
I have a large piece of R code with a loop that generates a plot at each iteration of the loop and prints each plot on the same page of a PDF (via par(mfrow=c(5,4)
).
If I break up my code into knitr chunks to make it more manageable, the graphical parameters are lost each time I leave the chunk and I lose the ability to output several plots on the same PDF page.
Is there a way to pass graphical parameters across chunks or to set the parameters as global so that all chunks can access them.