How to hide figures in knitr, but create them as png?
This is from knitr website:
fig.show: ('asis'; character) how to show/arrange the plots; fourpossible values are
asis: show plots exactly in places where they weregenerated (as if the code were run in an R terminal)
hold: hold allplots and output them in the very end of a code chunk
animate: wrapall plots into an animation if there are mutiple plots in a chunk
hide: generate plot files but hide them in the output document
fig.show = 'hide'
worked for me.