I am running the check() function (
devtools::check(document = FALSE, args = c('--no-manual')) on my package, but it fails with the following error :
E checking whether package 'DIANE' can be installed (5s) Installation failed. See 'D:/These/DIANE.Rcheck/00install.out' for details. See 'D:/These/DIANE.Rcheck/00check.log' for details. [...] -- Install failure ------------------------------------------------------------- * installing *source* package 'DIANE' ... ** using staged installation ** R ** inst ** byte-compile and prepare package for lazy loading Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called 'MASS' Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart Execution halted ERROR: lazy loading failed for package 'DIANE' * removing 'D:/These/DIANE.Rcheck/DIANE'
However, I have already installed the package MASS, it is in the classic R libraries path, and can be loaded without any problem from my R console.
Running the "Install and restart" button in RStudio (
Rcmd.exe INSTALL --no-multiarch --with-keep.source DIANE) on my package also works perfectly fine :
* installing to library 'C:/Users/Oceane/Documents/R/win-library/4.0' * installing *source* package 'DIANE' ... ** using staged installation ** R ** inst ** byte-compile and prepare package for lazy loading ** help converting help for package 'DIANE' *** installing help indices finding HTML links ... draw_MDS html draw_coseq_run html draw_distributions html draw_heatmap html estimateDEGs html done estimateDispersion html filter_sum html normalize html plotDEGs html run_app html run_coseq html ** building package indices ** testing if installed package can be loaded from temporary location ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (DIANE)
I tried to use non-staged intallation but the check also fails with the same error on MASS.
I am using rstudio v1.3.947, and R v4.0.0. The version of the concerned packages :
devtools_2.3.0 usethis_1.6.1 MASS_7.3-51.6
Do you have any idea on what is causing that behavior and how to solve it?