I am working on a package and running R CMD CHECK
on it using devtools::check()
produces the following NOTE
:
> checking top-level files ... NOTE
Non-standard file/directory found at top level:
'README.Rmd'
A variant of this question has been raised before (NOTE or WARNING from package check when README.md includes images), but that solution provided therein hasn't worked for me.
Here is my .Rbuildignore
file. As has been suggested, I have included ^README-.*\.png$
:
^.*\.Rproj$
^\.Rproj\.user$
^CONDUCT\.md$
^\.travis\.yml$
^README-.*\.png$
^cran-comments\.md$
Additionally, my README.Rmd
document has the following chunk, which saves all figures in /man/figures/
{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
If you need more details about the .Rmd
file, it's here:
https://github.com/IndrajeetPatil/ggstatsplot/blob/master/README.Rmd
Given that it's better to get rid of all possible NOTES
to successfully pass CRAN's R CMD CHECK
, how can I avoid this particular NOTE
?
Directories which do not come under the standard FHS are called non-standard directories. Non-standard directories are as follows: /cdrom. /run. /lost + found.
Rbuildignore is a Perl-compatible regular expression that is matched, without regard to case, against the path to each file in the source package 1. If the regular expression matches, that file or directory is excluded.
To exclude the file README.Rmd
from the tarball created by R, add
^README.Rmd
to the file .Rbuildignore
you already have. "Writing R Extensions" has more, should you need it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With