I am trying to set up continuous integration for my R package for the first time, using travis-CI. My package passes R CMD check with no Errors, Warnings, or Notes, but I keep getting the following error from travis: File figure1.png not found in resource path
travis-CI Error message
figure1.png (and all other images required for my vignettes) are saved in the /vignettes folder with the RMarkdown files. The vignettes build fine with devtools::install(build_vignettes = TRUE)
and devtools::install_github(build_vignettes = TRUE)
(worked on Windows and a Mac).
I've tried a few different things based on Wickham's R Packages, Writing R Extensions, and posts from different forums, but I always get the same error. I've tried:
Putting the vignette RMarkdown and image files in a /doc folder (which seems very un-devtools-like because this folder is added to .gitignore when you run build_vignettes(). I removed from .gitignore to try this).
Putting the vignette RMarkdown and image files in a inst/doc folder (same note as above).
Including a .install_extras file with in the vignettes folder, with the line "*.png".
Saving figure1 as a .jpg (because there is one .jpg file that is called BEFORE figure1.png, but I have not had an error about that image).
I also ran rhub::check_for_cran()
and got a similar warning message for several platforms (but not Windows, which is what I am using to write the package): File figure1.png not found in resource path
.
rhub warning
Can someone please clarify how I should save external images for my vignettes so that my package will pass this build check? I can provide a link to the repo if that would be helpful.
sessionInfo:
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
question from:
https://stackoverflow.com/questions/65829287/how-should-i-save-external-images-for-the-vignettes-in-my-r-package-so-that-my-p 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…