Thanks Dirk and Klaus. The package Matrix is not used directly but it is used by package survival, which was called in Suggests. So I am not sure what is the problem. But why CRAN has no such error https://cran.r-project.org/web/checks/check_results_bujar.html. I assumed the CRAN check uses the same R version 3.5.2 as I have. The problem only occurred when I used --as-cran option.
Zhu -----Original Message----- From: Dirk Eddelbuettel [mailto:dirk.eddelbuet...@gmail.com] On Behalf Of Dirk Eddelbuettel Sent: Saturday, January 12, 2019 5:19 PM To: Wang, Zhu Cc: r-package-devel@r-project.org Subject: Re: [R-pkg-devel] R CMD check --as-cran problem On 11 January 2019 at 22:51, Wang, Zhu wrote: | ** testing if installed package can be loaded | Error: package or namespace load failed for 'bujar' in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): | there is no package called 'Matrix' | Error: loading failed | Execution halted | ERROR: loading failed | | | I will appreciate advice on the matter. Something tries to use package Matrix but it is not installed. You may need it in Imports: (and then in NAMESPACE) or in Suggests: (and then test via if (requireNamepace(...) and load). Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel