NOTE or WARNING from package check when README.md includes images : <p>I have a package with a <code>README.Rmd</code> that I pass to <code>rmarkdown::render()</code> 
producing <code>README.md</code> and a directory <code>README_files</code>, which contains images in <code>README.md</code>. This looks like the tree below.</p>

<p><code>README_files</code> is <a href="https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Package-subdirectories" rel="noreferrer">not a standard package directory</a>, so if it isn't in <code>.Rbuildignore</code>, checking the package with <code>R CMD check</code> shows a note:</p>

<p><code>* checking top-level files ...
NOTE Non-standard file/directory found at top level:   README_files</code></p>

<p>But including the directory in <code>.Rbuildignore</code> leads to a warning, if and only if checking the package <code>--as-cran</code>. IIUC Pandoc tries to generate HTML from <code>README.md</code>, but the images are unavailable, in the ignored <code>README_files</code> directory.</p>

<pre><code>Conversion of ‘README.md’ failed:
pandoc: Could not fetch README_files/unnamed-chunk-14-1.png
README_files/unnamed-chunk-14-1.png: openBinaryFile: does not exist (No such file or directory)
</code></pre>

<p>Is there any way to get a clean check <code>--as-cran</code> here?</p>

<p><code>
├── README_files
│   └── figure-markdown_github
│       ├── unnamed-chunk-14-1.png
│       ├── unnamed-chunk-15-1.png
│       ├── unnamed-chunk-16-1.png
│       ├── unnamed-chunk-26-1.png
│       └── unnamed-chunk-27-1.png
├── README.md
├── README.Rmd
</code></p>
