0

everyone.

I am creating an R package to be installed from GitHub. My R package includes several RDS files, but two RDS files cause the following cryptic error when I try to install the package from GitHub:

Downloading GitHub repo <username>/<packagename>@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  download from 'https://api.github.com/repos/<username>/<packagename>/tarball/HEAD' failed

I am on Ubuntu and using this code to install the package:

require(devtools)
install_github("<username>/<packagename>")

Most my RDS data loads fine, it's just two that cause the package to not be downloadable from GitHub.

Both of these files are larger -- just under ~100 MB each -- but I read elsewhere that this file size should be okay.

Given the vague language of this error, I have no idea where to start trouble shooting this problem and I am having trouble finding information online.

Your advice is very appreciated!!

Edit: I have more evidence to believe size is not the issue, but I am still undecided.

I used the tools::resaveRdaFiles() to compress my large files to a small file size and they still cause the same error above.

generic
  • 302
  • 1
  • 3
  • 14
  • 2
    You haven't given us anything to try, but if you put the actual URL into a call to `download.file`, do you get an error? – user2554330 Jan 16 '22 at 19:44
  • Thanks for your reply! I can use `download.file` without an error. And is there anything I can provide other than my repo that would give you better insight to my problem? I'm mostly just looking for advice I guess because my repo is attached to a bunch of professional / work things, and I'm trying to maintain privacy. Sorry it isn't very insightful. – generic Jan 16 '22 at 22:07
  • `utils::download.file` is a standard function in base R. You can set the debug flag on it using `debug(utils::download.file)`, and then R will stop each time it is called. So maybe you can see why it works when you call it directly, but not when called from `install_github`. – user2554330 Jan 17 '22 at 10:15

0 Answers0