r语言 - "错误(函数(文件 = if (onefile) "Rplots.pdf" 否则 "Rplot%3d.pdf, "当我在 RStudio 中编译 PDF 时 (KNITR 包)



我在RStudio中创建了一个Sweave文件,主要代码为:

documentclass{article}
begin{document}
Hello
<<>>=
library(x)   
library(y)
library(z)
data(dataset)
plot(dataset$variable1, dataset$variable2)
[...] #This means "other lines", not literally written in my file
@
end{document}

PDF的汇编工作进展顺利。然后我添加了更多的代码行,但当我重新编译时,我得到了错误:

Error in (function (file = if (onefile) "Rplots.pdf" else "Rplot%3d.pdf,

在"问题"选项卡中,它说问题在于打开我第一次编译PDF时创建的图像文件。有什么建议吗?

已解决:

我删除了包含我的.Rnw文件的文件夹中的所有编译创建的文件,除了.Rnw:我删除了";数字";文件夹(仅包含图形(、.log文件、.tex文件s、.pdf文件和.gz文件。然后我再次编译了PDF,它成功了。

最新更新