[R-pkg-devel] R CMD check package subdirectory warning on filenames

Kevin Coombes kevin.r.coombes at gmail.com
Thu Jun 18 14:45:59 CEST 2015


In putting together my latest package, I'm getting the following warning 
from "R CMD check --as-cran"

* checking package subdirectories ... WARNING
Subdirectory 'inst/doc' contains invalid file names:
   '02oneGeneSims.Rnw' '02oneGeneSims.pdf'
Please remove or rename the files.
See section 'Package subdirectories' in the 'Writing R Extensions'

Having read the recommended section several times and looked everywhere 
I can to read about valid file names, I had a hard time figuring out why 
I was getting this message. Finally, I tried removing the "02" from the 
beginning of the filename, and the warning went away.

I still can't find anyplace in the manual that says "thou shalt not 
start a filename with a digit" or "thou shalt not start a filename with 
the number '0' followed by another digit". In fact, the second sentence 
of the section on Package subdirectories says "The code files to be 
installed must start with an ASCII (lower or upper case) letter or 

[1] Why is this restriction here?

[2] If the restriction must remain, can the warning message be improved 
so it actually tells you what the problem is? Or points to a place in 
the manual that actually tells you what the problem is?

[3] Since vignettes get listed in the help pages in alphabetical order, 
does this mean I have to call my vignettes "a.Rnw", "b.Rnw" and "c.Rnw" 
to get them listed in the order I want?


More information about the R-package-devel mailing list