[R-pkg-devel] Testing package on R-devel in a docker container
lattice is a "recommended" package. Those are contributed packages, not base packages, so they are optional, but most distributions of R include them. Regarding Dirk's "narrower" comment: I think that is really his decision about the docker container, not a property of R CMD check. R CMD check needs to be able to succeed if the only packages installed are the hard dependencies (Depends, Imports, plus base packages), but it doesn't actually install anything. That's up to you before running it. Duncan Murdoch
On 2025-08-11 8:26 a.m., Ott Toomet wrote:
Hmm... I am a little bit confused. * Is this "narrower" library path for CMD check explained somewhere? * Isn't lattice one of the default packages (graphics depends on it iirc), so it should be installed in any case? Thanks, anyway. So far my tiny test package https://github.com/otoomet/dummypkg (0.0-1) works, so now I am looking at vignettes. Cheers, Ott On Mon, Aug 11, 2025 at 4:27?AM Dirk Eddelbuettel <edd at debian.org> wrote:
On 10 August 2025 at 21:38, Ott Toomet wrote:
| root at f4024e015396:/# cat maxLik.Rcheck/00install.out
| * installing *source* package ?maxLik? ...
| ** this is package ?maxLik? version ?1.6-3?
| ** using staged installation
| ** R
| ** inst
| ** byte-compile and prepare package for lazy loading
| Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck =
vI[[i]])
| :
| there is no package called ?lattice?
| Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart ->
| doWithOneRestart
| Execution halted
| ERROR: lazy loading failed for package ?maxLik?
| * removing ?/maxLik.Rcheck/maxLik?
|
| Apparently 'lattice' is missing???
|
| * But it is there and I can load it with no errors:
|
| root at f4024e015396:/# RDscript -e "packageVersion('lattice')"
| [1] ?0.22.7?
| root at f4024e015396:/# RDscript -e "library(lattice)"
Because R CMD check uses a separate 'narrower' library path for checking a
package, you need to install the dependencies of the package you are
checking. So one way to address this is to 'RD CMD INSTALL lattice'
(followed
by whatever else your package needs) in your running Docker session.
Dirk
--
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
[[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel