I'm testing an R-package (called 'TRIMmaps') and ran devtools::check()
. The check "checking whether package ‘TRIMmaps’ can be installed" failed. In the log-files I found the following information:
in 00check.log...
* using log directory ‘/tmp/RtmpsnrErp/TRIMmaps.Rcheck’
* using R version 3.4.4 (2018-03-15)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using options ‘--no-manual --as-cran’
* checking for file ‘TRIMmaps/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘TRIMmaps’ version ‘1.14-0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘TRIMmaps’ can be installed ... ERROR
Installation failed.
See ‘/tmp/RtmpsnrErp/TRIMmaps.Rcheck/00install.out’ for details.
* DONE
...and in 00install.out:
* installing *source* package ‘TRIMmaps’ ...
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘lattice’
ERROR: lazy loading failed for package ‘TRIMmaps’
* removing ‘/tmp/RtmpsnrErp/TRIMmaps.Rcheck/TRIMmaps’
Following the advice of Hadley Wickham in his book 'R packages' I ran devtools::install()
to see what's going wrong during the installation, but it runs without any problem and the package gets installed! Why can it be installed with devtools::install() but not with devtools::check()?
Moreover I am puzzled by the message about the missing package lattice in 00install.out: lattice is installed, it is installed in my default library (the first displayed by .libPaths()
), it is listed in the DESCRIPTION file under Imports and it is listed in the NAMESPACE file.
Anyone a hint what's going on here? Thanks in advance!