[R-pkg-devel] README.Rmd and associated figure files

Baptiste Auguie baptiste.auguie at gmail.com
Sun Sep 10 00:15:31 CEST 2017


Hi,

I'm not sure what to do with README.Rmd; I followed Hadley's instructions*
at http://r-pkgs.had.co.nz/release.html but I'm getting a Warning from CRAN
(missing figure files). Writing R Extensions does not seem to mention this
particular way of generating a README.md file (and in fact, mildly
discourages README.md, see https://cran.r-project.org/
doc/manuals/r-release/R-exts.html#FOOT2). Here's what I've done:

- top level README.Rmd file with knitr option fig.path = "README-"
- ^README\.Rmd$ and  ^README-.*\.png$ added in .Rbuildignore

as a result, R CMD build creates README.md, and removes the associated
figures and Rmd source file. However CRAN issues a Warning that the png
files are missing.

So my next step has been to remove ^README-.*\.png$ from .Rbuildignore, but
that yields a NOTE: "Non-standard files/directories found at top level:
...<pngs>"

I thought perhaps this should go in .Rinstignore, but that yields the same
NOTE.

What is the proper way to deal with these image files? (pointing fig.path
to inst/ doesn't seem like an option either, as it will break the paths).

Has there been a recent change in how README.Rmd files are processed? (I
did not find this step documented in WRE). I looked at a few packages and
they seem to follow the model recommended in Hadley's r-pkgs resource, so
presumably it used to work without warnings.

Thanks,

baptiste


*: I realise this is not an official documentation; however, from a
pragmatic point of view, it would seem mutually beneficial if
recommendations could somehow be kept in sync between this document and
official CRAN policies.

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list