Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should there be a 'package' subfolder in a github package repo [duplicate]

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?

like image 536
PaulHurleyuk Avatar asked Feb 18 '23 05:02

PaulHurleyuk


1 Answers

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

like image 54
Ben Bolker Avatar answered Feb 20 '23 00:02

Ben Bolker