Skip to content

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

4 messages · Kevin Coombes, Ben Bolker, Brian G. Peterson

#
Hello,

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'
manual.

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 
digit...."

[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?

   Kevin
#
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


  It's specific to doc files. In the current version, section 1.4 says:

Documents in inst/doc can be in arbitrary format, however we strongly
recommend providing them in PDF format, so users on almost all
platforms can easily read them. To ensure that they can be accessed
from a browser (as an HTML index is provided), the file names should
start with an ASCII letter and be comprised entirely of ASCII letters
or digits or hyphen or underscore.

  (I didn't know that browsers had trouble accessing file names that
started with a digit?)

  I don't know when this was added ...

  Ben Bolker
On 15-06-18 08:45 AM, Kevin Coombes wrote:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJVgsROAAoJEOCV5YRblxUHHtYH/Rv/pnt8LuqnV25r2tIKP2+L
LQJkboYK8OW8doZu0sExS5ObdEMtsNEi60QaIHmGV8I9FTH2J5DdxblgTThyrEsz
Znjr7XAyUiua+05EYeHezxPiSYc7ElOouUiQ3CvPC8YLWOm5vBMxPIKcpJ0mtqiW
XK9DIdvW4pcfLMNiWbPIOyjUKSMGWouN46utRICyIkBQO1z7ZWgAyxEon6bqyoiP
vwpBpdeHtLGo4VFz4D0gLvYUlWpuySG1zGvvzeuMSG25G7WnF6WbqphfCK8jd4GE
PhaqOb6QEpQ1evD7GxoD6uABkgsb8IAGTI88pAsCsTnqNbOtuUtYHlU0stxhOmw=
=fsfi
-----END PGP SIGNATURE-----
#
On Thu, 2015-06-18 at 09:14 -0400, Ben Bolker wrote:
They don't.

the relevant rfc, I think, is this one:
https://www.ietf.org/rfc/rfc3986.txt

the 'unreserved' (allowed) characters are

 unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"

(RFC3986, p. 12)

One would assume that R should also allow all unreserved characters in
file names for documents, vignettes, etc.

Regards,

Brian
#
Thanks for pointing me to the correct section. (I failed to find this 
paragraph when I looked more widely since I only searched the PDF manual 
on "filename", which is used sometimes, and not "file name", which is 
also used some times.) And it is worth noting that this description in 
section 1.4 is not the same as section 1.1.5 where the R CMD check 
warning points....

And I'm pretty sure that browsers have no difficulty finding files whose 
name starts with a digit.

Thanks,
   Kevin
On 6/18/2015 9:14 AM, Ben Bolker wrote: