Install more if not all r-cran-* packages

79 Views Asked by At

Currently trying to use streamlit for simple deployment. To install r packages I have a packages.txt file containing the packages e.g.

r-base
r-base-dev
r-base-data.table
r-cran-mlr3

When deploying the app this will run something like apt-get install r-base etc. However, I do get errors when they are not available: E: Unable to locate package r-cran-mlr3

From what I understand only a small number of CRAN packages can be installed this way. Is there a way to add more if not all the CRAN packages so that apt install r-cran-* would work?

1

There are 1 best solutions below

6
Ben Bolker On

You should look at the r2u project, which provides

all CRAN packages (modulo at best handful of blacklisted ones) including all packages needing compilation

This is way more than the set of packages listed on the main Debian site (which I got to from the CRAN Debian page).

The README linked above gives setup information.

(I have r2u set up on Pop!OS 22.04 [based on Ubuntu 22.04] and had no trouble with apt-get install r-cran-mlr3)