我剛剛將 R 更新到 3.0.0。我無法從 .Rnw 檔案編譯 PDF,而使用 R 2.15 可以做到這一點。這是我得到的錯誤:
! Undefined control sequence.
l.192 \SweaveOpts
{concordance=TRUE}
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.
似乎與Sweave有關。但我正在使用 knitr 來編織 .Rnw 檔案。有人可以幫我解決這個問題嗎?
答案1
\SweaveOpts{concordance=TRUE}
在您的 Rnw 檔案中刪除。是無效的,沒有用的knitr
。
更新:我已經修復了開發版本(v1.2.4)中的劇情問題。看這裡有關安裝的說明。最終它將進入穩定版本 1.3,但可能要一個月後。