R CMD检查错误,从Rnw文件编译为PDF

时间:2019-06-01 13:41:25

标签: tex sweave rnw

要从Rnw文件创建PDF,例如说AAAAAA.Rnw,请在R studio中按[Compile PDF](快捷键为[Control + Shift + k]),然后创建PDF时没有任何错误。但是,R CMD检查具有以下错误。我不明白。

E  creating vignettes (26s)
   Warning in remind_sweave(if (in.file) input, sweave_lines) :
     It seems you are using the Sweave-specific syntax in line(s) 66; you may need Sweave2knitr("AAAAAA.Rnw") to convert it to knitr
   Warning in system(paste(shQuote(texi2dvi), if (quiet) "--quiet" else "",  :
     running command '"C:\w32tex\bin\texi2dvi.exe" --quiet --pdf "theory_third_edition.tex" ' had status 1
   Error: running 'texi2dvi' on 'AAAAAA.tex' failed

   LaTeX errors:
   ! Undefined control sequence.
   l.117 \SweaveOpts
                    {concordance=TRUE}
   The control sequence at the end of the top line
   of your error message was never \def'ed. If you have
   Execution halted
Error in (function (command = NULL, args = character(), error_on_status = TRUE,  : 
  System command error
Calls: <Anonymous> ... eval -> with_envvar -> force -> do.call -> <Anonymous>
Execution halted

0 个答案:

没有答案