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

Uwe Ligges ligges at statistik.tu-dortmund.de
Mon Sep 11 09:24:46 CEST 2017


If the images are also used for vignettes or Rd files, you can put them
in the 'vignettes' or 'man/figures' directories. Otherwise, please put
them in the top-level 'tools' directory, or a subdirectory of it.

Uwe Ligges

On 10.09.2017 00:15, Baptiste Auguie wrote:
> 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
> 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]]
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

More information about the R-package-devel mailing list