[R-pkg-devel] Is it possible to install a pre-compiled R package from Github?
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Tue Jan 28 15:09:29 CET 2025
On 28 January 2025 at 14:27, Iñaki Ucar wrote:
| El mar., 28 ene. 2025 14:25, John Clarke <john.clarke using cornerstonenw.com>
| escribió:
|
| > Hi all,
| >
| > 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.
|
|
| Yes, see https://r-universe.dev/
In particular, you can get a binary for Ubuntu 24.04 and either R 4.4.* or R
4.5.* via the step described at [1] as seen in [2] below. Here we use the
'rcppcore' universe as the home for Rcpp:
> install.packages("Rcpp",
repos = c(linux = 'https://rcppcore.r-universe.dev/bin/linux/noble/4.4/',
sources = 'https://rcppcore.r-universe.dev',
cran = 'https://cloud.r-project.org'))
[1] https://docs.r-universe.dev/install/binaries.html#does-r-universe-have-linux-binaries
[2] Full log using rocker/r-ubuntu container
edd using rob:~$ docker run --rm -ti rocker/r-ubuntu:24.04 R
R version 4.4.0 (2024-04-24) -- "Puppy Cup"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> install.packages("Rcpp", repos = c(linux = 'https://rcppcore.r-universe.dev/bin/linux/noble/4.4/', sources = 'https://rcppcore.r-universe.dev', cran = 'https://cloud.r-project.org'))
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://rcppcore.r-universe.dev/bin/linux/noble/4.4/src/contrib/Rcpp_1.0.14.1.tar.gz'
Content type 'application/gzip' length 2210475 bytes (2.1 MB)
==================================================
downloaded 2.1 MB
* installing *binary* package ‘Rcpp’ ...
* DONE (Rcpp)
The downloaded source packages are in
‘/tmp/Rtmpwhfif9/downloaded_packages’
> library(Rcpp)
Warning message:
package ‘Rcpp’ was built under R version 4.4.2 # running apt update; apt upgrade fixes this
> packageVersion("Rcpp")
[1] ‘1.0.14.1’
>
|
| Iñaki
|
|
| I will likely use
| > CRAN, but I'm curious if installing via pre-compiled versions is limited to
| > CRAN or whether there is another way. This is related to a Rcpp project I'm
| > working on (so compiling C++), but I think the question is general enough
| > that it can be asked on this list.
| >
| > Thank you,
| >
| > -John
| >
| > John Clarke | Senior Technical Advisor |
| > Cornerstone Systems Northwest | john.clarke using cornerstonenw.com
| >
| > [[alternative HTML version deleted]]
| >
| > ______________________________________________
| > R-package-devel using r-project.org mailing list
| > https://stat.ethz.ch/mailman/listinfo/r-package-devel
| >
| >
|
| [[alternative HTML version deleted]]
|
| ______________________________________________
| R-package-devel using r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-package-devel
--
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-package-devel
mailing list