Open yihui opened 12 years ago
Thank you for the corrections, Yihui.
Does Sweave have to be loaded as a LaTeX package for \SweaveOpts{} to be read? I noticed in the code to the knitr manuals that the \SweaveOpts{} line was commented out, so I'm curious as to what happens if Sweave is loaded as a LaTeX package but the document is run in R with knit() rather than Sweave().
Dennis
From: Yihui Xie reply@reply.github.com To: Dennis Murphy djmurphy0420@yahoo.com Sent: Thursday, January 26, 2012 6:36 PM Subject: [ggplot2-transition-guide] a few knitr issues (#1)
setup
chunk must not be cached (should use cache=FALSE
)\SweaveOpts{cache=TRUE}
so you do not have to set it in every single chunk (only need to set cache=FALSE
for those you do not want to cache); the same issue applies to message=FALSE
echo=TRUE
is by default, so no need to set it explicitlyReply to this email directly or view it on GitHub: https://github.com/djmurphy420/ggplot2-transition-guide/issues/1
No, sweave is not needed. It is just a matter of syntax. And it does not matter where is \SweaveOpts{}
; it can appear after %
. I wrote it there because I want to make the document as LaTeX-ish as possible (\SweaveOpts{}
itself is not a valid LaTeX command).
setup
chunk must not be cached (should usecache=FALSE
)\SweaveOpts{cache=TRUE}
so you do not have to set it in every single chunk (only need to setcache=FALSE
for those you do not want to cache); the same issue applies tomessage=FALSE
echo=TRUE
is by default, so no need to set it explicitly