[R-pkg-devel] Advice about non-replicable error in CRAN R CMD check

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Mon Oct 21 13:59:34 CEST 2019


David,

On 21 October 2019 at 11:30, Dueber, David wrote:
| When I submitted my package (BifactorIndicesCalculator: https://github.com/ddueber/BifactorIndicesCalculator) to CRAN, the automated checks returned an error for the development release of R in Windows. The log file is (https://win-builder.r-project.org/incoming_pretest/BifactorIndicesCalculator_0.1.0_20191020_051536/Windows/00check.log), and the error message is pasted at the bottom of this e-mail. I tried to replicate this error locally, on R-hub, and winbuilder, but to no avail. The log file from winbuilder is (https://win-builder.r-project.org/OJ4O68aeF9OG/00check.log)
| 
| I am not 100% sure what the error means, other than that some package (either MplusAutomation or a package it uses, or a package used by a package MplusAutomation uses) seems to be referring to a package named "scales" which does not exist. But I have no idea why I can't replicate the error, and certainly have no idea how to fix it. Any help/advice would be appreciated. Thanks!
| 
| -David Dueber
| 
| Running the tests in 'tests/testthat.R' failed.
| Complete output:
|   > library(testthat)
|   > library(BifactorIndicesCalculator)
|   >
|   > test_check("BifactorIndicesCalculator")
|   -- 1. Error: bifactorIndicesMplus Works (@test-BifactorIndicesCalculator.R#413)
|   there is no package called 'scales'
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Someone depends on package 'scales', either you, or one of your dependencies.

I said more about that in the past [1], but in short

 - if it is a dependency, you need to depend on on it via Imports:;
 
 - if it is not meant to be one then you need to condition on it via eg code
   of the form 'if (RequireNamespace(pkgName), quietly=TRUE))'

Dirk

[1] http://dirk.eddelbuettel.com/blog/2017/03/22#suggests_is_not_depends

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-package-devel mailing list