Edit: it is actually devtools::check()
who is causing this warning and not R CMD check
. I just tried with R CMD check
and it works with the BinaryFiles!
I feel stupid that I can't figure this out, but I want to add some data to my R-package and I put everything in inst/extdata. Unfortunately on Linux the files are recognized as an executable while they are just a NMR data file (R CMD check uses file
for this).
The warning I get:
checking for executable files ... WARNING
Found the following executable files:
inst/extdata/Sample123/10/fid
inst/extdata/Sample22/10/fid
inst/extdata/Sample244/10/fid
inst/extdata/Sample281/10/fid
inst/extdata/Sample294/10/fid
inst/extdata/Sample396/10/fid
inst/extdata/Sample40/10/fid
inst/extdata/Sample452/10/fid
inst/extdata/Sample460/10/fid
inst/extdata/Sample9999/10/fid
Source packages should not contain undeclared executable files.
See section ‘Package structure’ in the ‘Writing R Extensions’ manual.
I found in the Writing R Extensions manual that I can silence this warning by adding a file called BinaryFiles
at the top level of my package. I need to add one line per path, but devtools::check()
keeps on complaining about these files. My BinaryFiles
looks like:
inst/extdata/Sample123/10/fid
inst/extdata/Sample22/10/fid
inst/extdata/Sample244/10/fid
inst/extdata/Sample281/10/fid
inst/extdata/Sample294/10/fid
inst/extdata/Sample396/10/fid
inst/extdata/Sample40/10/fid
inst/extdata/Sample452/10/fid
inst/extdata/Sample460/10/fid
inst/extdata/Sample9999/10/fid
The file ends with an empty line. I also tried adding ./
in front of the path, but still it doesn't work. Does anybody know what I'm doing wrong?
I created a dummy package. You can find it here.
Cheers, Rico