Skip to content
Prev 11694 / 12125 Next

[R-pkg-devel] Testing package on R-devel in a docker container

Thanks, everyone, for responding.  Here a summary of my research so
far--I do not quite understand what I am doing, but I spotted
a number of different issues, and I got the checks to work.

* I was not aware of the distinction between default and recommended
  packages, and the fact that the latter is not installed by default
  (although usually they are on production systems).
* in the rocker/r-devel container, R and R-devel use (partly)
  overlapping lib paths: `/usr/local/lib/R/site-library` and
  `/usr/lib/R/library`.

* R and R-devel have different packages installed by default, but
  because both access `/usr/lib/R/library`, both seem to have access
  to both default and recommended packages.
* `RD CMD check` uses a different lib path, containing
  `/usr/local/lib/R/library` and a temporary folder.  The latter will
  contain the needed packages given they are installed in a certain
  location (I still do not understand how they get there, and from
  where).
* The message I got -- package _lattice_ not available -- was due to
  two reasons: a) it is a recommended, not a default package; and b)
  it is installed in `/usr/lib/R/library` where it is normally
  accessible for both R and R-devel, and hence was not installed
  again.  However, from there it is not copied to the temporary folder that
  R CMD check uses.
* Finally, by setting `ENV R_LIBS=/usr/local/lib/R/site-library/` in
  the Dockerfile, the checks work.  But I am not sure why.

It would be great to isolate R and R-devel better in the docker
image.  Not sure whether it is easy to do...

Cheers,
Ott

On Tue, Aug 12, 2025 at 1:17?AM Berwin A Turlach <berwin.turlach at gmail.com>
wrote: