[Tex/LaTex] knitr problem after update to R 3.0.0


I just updated R to 3.0.0. I couldn't compile PDF from my .Rnw file, which I could do with R 2.15. Here is the error I got:

! Undefined control sequence.
l.192 \SweaveOpts
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

It seems related to Sweave. But I was using knitr to weave .Rnw file. Could some one help me fix the problem?

Best Answer

Remove \SweaveOpts{concordance=TRUE} in your Rnw file. It is invalid and useless to knitr.

Update: I have fixed the plot problem in the development version (v1.2.4). See here for instructions on installation. It will go to the stable version 1.3 eventually, but perhaps not until a month later.