I am working on a knitr-sweave document and found that global parameters R such as
par(lwd=3)
and
strOptions(strict.width='cut')
do not take effect in later code snippets. I can specify these parameters as arguments every time I draw () or str (), so this is not a huge problem. I'm just wondering if anyone has an idea about this. Should I cache a piece of code where I set these parameters? I call some libraries in the earlier code snippets and set the variables in others, and they all seem to be accessible “globally” (i.e. in the later code snippets).
source share