[R-sig-Debian] R Package: 'ggbreak' in Dockerfile

Dirk Eddelbuettel
Tue, 15 Oct 2024 13:40:23 -0000

On 15 October 2024 at 13:21, James W. MacDonald wrote:
| Don't you have to load BiocManager before using it?

Correct. The most minimal 'proof' I can offer is that after

   docker run --rm -ti rocker/r2u:noble

the one line 'two-command' wrapping both R CMD INSTALL for BiocManager
plus
calling BiocManager::install() for ggbreak, ie

   time (install.r BiocManager; installBioc.r ggbreak)

finishes in 16 seconds from my machine (on decent connectivity) installing 35
(binary) packages in total on Ubuntu 24.04 ending in

  [... stuff omitted ...]

  'getOption("repos")' replaces Bioconductor standard
repositories, see
  'help("repositories", package = "BiocManager")'
for details.
   Replacement repositories:
       CRAN: https://cloud.r-project.org
   Bioconductor version 3.19 (BiocManager 1.30.25), R 4.4.1 (2024-06-14)
   Installing package(s) 'BiocVersion', 'ggbreak'

   [... two screens full of logs omitted]

   Setting up r-cran-ggbreak (0.1.2-1.ca2404.1) ...

   real    0m16.012s
   user    0m8.481s
   sys     0m2.769s

This uses binaries thanks to r2u [1] but you can of course do it 'by
hand'
from source too if you ensure you have all your ducks in a row as all
packages are in good standing at CRAN and BioConductor.  Doing it
incrementally and carefully perusing your build logs should get you there.

Dirk

[1] More about r2u is at https://eddelbuettel.github.io/r2u/

--
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org