[R-pkg-devel] Is it possible to install a pre-compiled R package from Github?

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Tue Jan 28 15:36:58 CET 2025


В Tue, 28 Jan 2025 14:25:23 +0100
John Clarke <john.clarke using 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



More information about the R-package-devel mailing list