在 R 包中,我有两个旧版 Sweave 小插图作为.Rnw
文件。当我在本地检查包时(在 R Studio 中:Build -> Check),没有错误或警告,当我使用 R 版本 3.3.1 Patched (2016-10) 在 R-Forge 上检查我的包时,情况也是如此-17 r71531)。
但是,当我将包提交给 Win-builder (via devtools::build_win()
) 以在 R devel (unstable) (2016-10-16 r71524) 下检查时,我收到以下无法解决的警告:
Files in the 'vignettes' directory newer than all files in 'inst/doc':
'fig/plot-Ortho-fm1.pdf', 'fig/plot-Ortho-fm3.pdf',
'fig/plot-grades-can-class.pdf', 'fig/plot-grades-can-gpa.pdf',
'fig/plot-grades-can-sex.pdf', 'fig/plot-grades-pairs.pdf',
'fig/plot-hern-can-age.pdf', 'fig/plot-hern-can-build.pdf',
'fig/plot-hern-can-cardiac.pdf', 'fig/plot-hern-can-pstat.pdf',
'fig/plot-hern-pairs.pdf', 'fig/plot-jury-can1.pdf',
...
我的包目录结构包括 in 的小插曲和 in的vignettes/
结果,如下所示:devtools::build_vignettes()
inst/doc/
...
man/
inst/
doc/HE-examples.{pdf,R,Rnw}
doc/repeated.{pdf,R,Rnw}
R/
vignettes/HE-examples.Rnw
/repeated.Rnw
/fig/ # all generated fig files
我将生成的.pdf
文件包含在其中的原因inst/doc/
是,否则我会收到警告说.pdf
文件需要使用 压缩qpdf
,而我实际上可以这样做的唯一方法是在 Acrobat Pro 中打开它们并重新保存为压缩 PDF。
我尝试添加inst/doc
to .Rbuildignore
,但这会产生错误。我也尝试添加inst/doc/*.pdf
,.Rbuildignore
但没有效果。
该警告阻止我向 CRAN 提交更新。我不明白为什么更新的文件vignettes/
应该是一个问题,但我该如何解决这个警告?