how to install binary package from github in R

I have an R binary package in github. The following code does not work. Could any one can help me to install this.

Greate thanks

devtools::install_github('yikeshu0611/set',type = 'binary')

Would you mind linking to your repository? Thank you :slight_smile:

Thanks. here is the [link](https://github.com/yikeshu0611/set)

Sorry as this is not an answer, but why have you uploaded this rather than the source package?

Were you trying to build some sort of CRAN-like repo?

because i think we can install source package from github. So why binary package can not be?

Because that is not a use case that devtools::install_github() is prepared for.

But you can install it with install.packages():

install.packages(
  "https://github.com/yikeshu0611/set/archive/refs/heads/main.zip", 
  repos = NULL, 
  type = "win.binary"
)

This probably works, but I haven't tested it.

this can be download. however can not be installed.
Greate thanks.

Warning in install.packages :
  cannot open compressed file 'main/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection

Oh, yeah, install.packages() is picky when installing a zip file, and you need to rename it to match the name of the package: set.zip.

Or you can change the default branch to set, and then the URL will have set.zip.

But I agree with Maelle, distributing binary packages as repositories is a weird and uncommon solution. You can upload the whole zip file into a repo, and even better, as a release artifact.

1 Like

Greate thanks to Maelle and Gabor.

Potentially relevant for your use case: rOpenSci | How to create your personal CRAN-like repository on R-universe

This topic was automatically closed after 45 days. New replies are no longer allowed.


If you have a query related to it or one of the replies, start a new topic and refer back with a link.