[R-pkg-devel] Is it possible to install a pre-compiled R package from Github?
Thanks Ivan, I?aki, and Dirk for your answers -- I'm happy to know about https://r-universe.dev/. I also deduce that I can compile my own binaries and host them as releases in Github and have R users install from these binaries as well. Kind regards, -John
On Tue, Jan 28, 2025 at 3:37?PM Ivan Krylov <ikrylov at disroot.org> wrote:
? Tue, 28 Jan 2025 14:25:23 +0100 John Clarke <john.clarke at cornerstonenw.com> ?????:
I'm wondering if there is a way to point an R package installer to a pre-compiled release on Github rather than rely on CRAN.
From the point of view of install.packages(), a repository is a collection of package files plus an index file arranged in a certain directory structure: https://cran.r-project.org/doc/manuals/R-admin.html#Setting-up-a-package-repository You can create these index files yourself using tools::write_PACKAGES() or the 'drat' package, then publish them on any free web hosting: https://search.r-project.org/R/refmans/tools/html/writePACKAGES.html https://cran.r-project.org/package=drat install.packages() will then be able to use this repository using either its contriburl=... or the repos=... argument. The above-mentioned R-Universe will, indeed, not only help you host your packages, but also build your source packages into binary packages for a number of platforms. -- Best regards, Ivan