Question

I developed a small R package using devtools and put it on github (https://github.com/paulhurleyuk/PaulHurleyMisc). I created it with this structure

PaulHurleyMisc\
    R\
    data\
    man\

because its a git repository, there is also a .git folder in the root, and when I do R CMD Check R complains about executable files.

Should I have created a subfolder under the root for the package ? I haven't tried installing from github using devtools, so what would devtools expect?

Was it helpful?

Solution

I think you'll get rid of the warnings/errors if you check by doing R CMD build first and then running R CMD check on the tarball (this is recommended practice: http://cran.r-project.org/doc/manuals/r-release/R-exts.html#Checking-packages ). I don't think you actually need to put .git etc. in .Rbuildignore, as R now automatically ignores .git, .svn etc. files: see utils.R in the tools package (this has been true for a while)

As @hadley points out in comments below, devtools automatically follows this route (i.e. it builds the tarball and then checks it rather than checking the directory directly)

Also see: Blacklist .git folder in R CMD check

OTHER TIPS

Everything looks ok to me. If you're getting complains when you use R CMD stuff you can easily tell R to ignore some stuff by adding the corresponding files/folders to the .Rbuildignore file

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top