Which is the correct folder to store images used in vignettes for R packages ? Which is the correct folder to store images used in vignettes for R packages ? r r

Which is the correct folder to store images used in vignettes for R packages ?


It's pretty clearly described in the Writing R Extensions manual:

All other files needed to re-make the vignettes (such as LaTeX style files, BibTeX input files and files for any figures not created by running the code in the vignette) must be in the vignette source directory.


It is also appropriate to put them in the "man/figures" folder -- this also holds for images you may have in your README.

See comment by Hadley on github issue that happens to reference guidelines: https://github.com/r-lib/pkgdown/issues/280#issue-213905707


I'm thinking that jpgs would fall under Hadley's advice here

If you want to store binary data and make it available to the user, put it in data/. This is the best place to put example datasets.