Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Files in Collate field missing from package when installing from Github

Tags:

package

r

build

Note: I cross-posted this question here: https://github.com/hadley/devtools/issues/245

Update: @hadley just closed the issue since he can install now. I have tested it just now and install_github works on Windows too. Apparently I need wait for some time for Github archive to include the new committed changes. For people encounter the same problem, @hadley pointed out that I have .R and .r files in R/ and all the files in DESCRIPTION collate have .r extensions.

I am writing an R package and put it on Github. I can build and load on my own computer. However, after running install_github("KineticEval",username="zhenglei-gao"), I got the following error:

* installing *source* package 'KineticEval' ...
** R
Error in .install_package_code_files(".", instdir) : 
files in 'Collate' field missing from 'C:/Users/z.gao/AppData/Local/Temp/RtmpUzWWYn    /R.INSTALLd3c17515a0/KineticEval/R':
  kingraph.r
  kinplot.r
  FOCUS2006A.r
  FOCUS2006B.r
  FOCUS2006C.r
  FOCUS2006D.r
  modFit1.r
  IRLSkinfit.full.r
  mkinfit.full.r
ERROR: unable to collate and parse R files for package 'KineticEval'
* removing 'C:/Users/z.gao/R-dev/KineticEval'

A related question is here: Files in Collate field missing from package after build from incorrect .Rbuildignore file

But I can't figure out whether the error is also related to my .Rbuildignore file.

like image 868
Zhenglei Avatar asked Feb 06 '13 11:02

Zhenglei


1 Answers

For people encounter the same problem, Hadley(from Github) pointed out that I have .R and .r files in R/ and all the files in DESCRIPTION collate have .r extensions. I use roxygenize to generate the collate field in DESCRIPTION.

What I did is deleting all files in R/ in the local repository and copy back, push it to Github. Only renaming .R as .r under Windows does not change the remote repository. Then the error occured again afterwards so I asked here to see if there is something more I should fix. But after a day, the error disappeared.

like image 147
Zhenglei Avatar answered Sep 30 '22 19:09

Zhenglei