How can I set graphical parameters (par()) and structure options (strOptions()) in a knitr document?
问题 I am working on a knitr-sweave document and have found that global R options like par(lwd=3) and strOptions(strict.width='cut') do not take effect in later code chunks. I can specify these options as arguments each time I plot() or str(), so it's not a huge problem. I'm just wondering if anyone has any insight into this. Should I be caching the code chunk where I set these options? I call some libraries in early code chunks and set variables in others and they all seem to be accessible