Package checks/builds locally, but devtools::install_github fails when loading required .rda.

91 views
Skip to first unread message

Casey S

unread,
Nov 10, 2015, 10:46:48 AM11/10/15
to devtools
Out of my depth with this one:

I have a small package passing check and building fine on my local machine an up-to-date github repository for this same project. Trying to devtools::install_github('repo/project') consistently fails, however, with the following warning and error:

Warning: file 'genesets.rda' has magic number 'versi'
  Use of save versions prior to 2 is deprecated
Error : bad restore file magic number (file may be corrupted) -- no data loaded
ERROR: lazydata failed for package 'sear'

The .rda in question is required data for some functions included in the package. It's in a standalone .rda in the /data folder rather than in sysdata.rda because the data.frame itself could be useful to users as a standalone (Moving forward it might make sense to break apart data and current package functionality, but for now this is the way I have it.)

The .rda was created using :

devtools::use_data(genesets, compress = 'bzip2')

I've tried re-creating it with different compression (to change the hash and force a change for git to pickup and also doing:

save(genesets, file = 'data/genesets.rda', compress = 'bzip2')

Still getting the same error though. I should add that the rda object in question used to cause no problem... unfortunately I wasn't checking whether devtools::install_github() worked with every commit, so identifying the change that did it could take a bit of work.... Any ideas?

Thanks in advance!

Hadley Wickham

unread,
Nov 10, 2015, 3:53:21 PM11/10/15
to Casey S, devtools
Can you share the github link?
Hadley
> --
> You received this message because you are subscribed to the Google Groups
> "devtools" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rdevtools+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
http://had.co.nz/

Casey S

unread,
Nov 10, 2015, 3:56:18 PM11/10/15
to Hadley Wickham, devtools

Hadley Wickham

unread,
Nov 10, 2015, 4:01:02 PM11/10/15
to Casey S, devtools
The problem is that github's support for LFS is pretty minimal
currently, and the zip bundle that install_github() uses only contains
the pointers, not the files themselves. You can track progress on
adding support from the devtools end at
https://github.com/hadley/devtools/issues/889


Hadley
--
http://had.co.nz/

Casey S

unread,
Nov 10, 2015, 4:19:27 PM11/10/15
to Hadley Wickham, devtools

Totally forgot I switched to lfs at some point because I was toying around with including a much larger data set...

Thanks Hadley!

Reply all
Reply to author
Forward
0 new messages