[R-pkg-devel] Reverse dependencies - again

J C Nash profjcn@@h @ending from gm@il@com
Wed Jul 11 16:00:43 CEST 2018


Excuses for the length of this, but optimx has a lot of packages
using it.

Over the past couple of months, I have been struggling with checking
a new, and much augmented, optimx package. It offers some serious
improvements:
  - parameter scaling on all methods
  - two safeguarded Newton methods
  - improved gradient approximations
  - more maintainable structure for adding new solvers in future
  - a single method "solver" (wrapper) that uses optim() syntax

However, I have been going through a lot of bother with reverse
dependency checking. In summary, tools::check_packages and
devtools::revdep_check both give lots of complaints, in particular
about packages that cannot be installed. When I run my own checks
(see below), I get no issues that reflect on my own package. Similarly,
Duncan Murdoch was very helpful and ran a check on an earlier version
with no major issues using his own check program. I have noticed,
or been told, that several other workers have their own procedures
and that they have experienced somewhat similar difficulties.

Unfortunately, my last effort to submit to CRAN got blocked at the
pre-scan stage because of reverse dependencies. I have not been able
to fix what I cannot find, however, as it appears I am getting caught
on an obstacle outside my control. I did not get a response from the
CRAN team, but the timing was in the middle of the R3.5 launch, so
understandable. However, I am very reluctant to use submission to
CRAN as a checking tool.

My questions:

1) Am I missing something in my method of calling tools or devtools?
The code is included below. Or not reading the output carefully?
I will be happy to put detail on a website -- too large for here.

2) Is it time to consider an effort to provide online revdep checking
that would avoid pressure on CRAN team directly and would provide
clearer indicators of the issues raised by a particular package? I'd
be happy to assist in such an effort, as it appears to be needed, and
with appropriate output and links could aid developers to improve
their packages.

Cheers,

John Nash

tools::check_packages_in_dir finds install fail for

BioGeoBEARS
CensSpatial
Countr
ecd
ldhmm
LifeHist
macc
marked
midasr
QuantumClone
spfrontier
surrosurv

Code:

# cranrevdep

require(tools)
pkgdir <- "~/temp/wrkopt/srcpkg"
jcheck<-check_packages_in_dir(pkgdir,
                      check_args = c("--as-cran", ""),
                      reverse = list(repos = getOption("repos")["CRAN"]))
summary(jcheck)

---------------------------------------------------------------------

devtools::revdep_check finds install fail for:

afex
IRTpp
lme4

as well as

BioGeoBEARS
CensSpatial
Countr
ecd
ldhmm
LifeHist
macc
marked
midasr
QuantumClone
spfrontier
surrosurv

Summary:
Saving check results to `revdep/check.rds` -----------------------------------------------------------------------
Cleaning up ------------------------------------------------------------------------------------------------------
* Failed to install: afex, BioGeoBEARS, CensSpatial, Countr, ecd, IRTpp, ldhmm, LifeHist, lme4, macc, marked, midasr,
QuantumClone, spfrontier, surrosurv
* ACDm: checking compilation flags used ... WARNING
* languageR: checking Rd cross-references ... WARNING
* mvord: checking compilation flags used ... WARNING
* RandomFields: checking compilation flags used ... WARNING
* rankdist: checking compilation flags used ... WARNING
* regsem: checking compilation flags used ... WARNING


21 packages with problems

|package      |version | errors| warnings| notes|
|:------------|:-------|------:|--------:|-----:|
|ACDm         |1.0.4   |      0|        1|     1|
|afex         |0.21-2  |      1|        0|     0|
|BioGeoBEARS  |0.2.1   |      1|        0|     0|
|CensSpatial  |1.3     |      1|        0|     0|
|Countr       |3.4.1   |      1|        0|     0|
|ecd          |0.9.1   |      1|        0|     0|
|IRTpp        |0.2.6.1 |      1|        0|     0|
|languageR    |1.4.1   |      0|        1|     4|
|ldhmm        |0.4.5   |      1|        0|     0|
|LifeHist     |1.0-1   |      1|        0|     0|
|lme4         |1.1-17  |      1|        0|     0|
|macc         |1.0.1   |      1|        0|     0|
|marked       |1.2.1   |      1|        0|     0|
|midasr       |0.6     |      1|        0|     0|
|mvord        |0.3.1   |      0|        1|     0|
|QuantumClone |1.0.0.6 |      1|        0|     0|
|RandomFields |3.1.50  |      0|        1|     2|
|rankdist     |1.1.3   |      0|        1|     0|
|regsem       |1.1.2   |      0|        1|     0|
|spfrontier   |0.2.3   |      1|        0|     0|
|surrosurv    |1.1.24  |      1|        0|     0|


But there are 43 dependencies, so must we assume rest are OK?
> require(devtools)
Loading required package: devtools
> rdlist <- revdep()
> rdlist
 [1] "ACDm"              "afex"              "bbmle"
 [4] "BioGeoBEARS"       "calibrar"          "CatDyn"
 [7] "CensSpatial"       "CJAMP"             "Countr"
[10] "dimRed"            "ecd"               "embryogrowth"
[13] "gear"              "heemod"            "invGauss"
[16] "IRTpp"             "languageR"         "lava"
[19] "ldhmm"             "LifeHist"          "LIHNPSD"
[22] "lme4"              "macc"              "marked"
[25] "midasr"            "monmlp"            "mrds"
[28] "mvord"             "nlmrt"             "NormalGamma"
[31] "parfm"             "PartCensReg"       "phenology"
[34] "QuantumClone"      "RandomFields"      "rankdist"
[37] "regsem"            "REndo"             "ROI.plugin.optimx"
[40] "sgt"               "spfrontier"        "surrosurv"
[43] "Synth"
>

Code:

# devrevdep180710
require(devtools)
pname <- "optimx180710"
ppath <- paste("~/temp/wrkopt/",pname, sep='')
options(devtools.revdep.libpath="~/temp/wrkopt/dlpkg")
getOption("devtools.revdep.libpath")
# revdep_check_resume(ppath, quiet_check=FALSE, check_dir="~/temp/wrkopt/revchecks")
revdep_check(ppath, quiet_check=FALSE, check_dir="~/temp/wrkopt/revchecks")
revdep_check_save_summary(ppath)
revdep_check_print_problems(ppath)

--------------------------------------

My own, more or less manual, checks use

Code:

require(devtools)

jnrd <- function(pname){
   tdir <- "/home/john/temp/wrkopt/tt/"
   setwd(tdir)
   pkg <- download.packages(pname, destdir=tdir)[2]
   cmd <- paste("R CMD check ",pkg)
   system(cmd)
}

rdlist <- devtools::revdep("optimx")
npkg <- length(rdlist)
for (ii in 1:npkg){
   jnrd(rdlist[ii])
#   TMP <- readline("Continue?")
}

Grep'ing the resulting files for "Status:" I found

ACDm.Rcheck/00check.log:Status: OK
afex.Rcheck/00check.log:Status: OK
bbmle.Rcheck/00check.log:Status: OK
BioGeoBEARS.Rcheck/00check.log:Status: 2 NOTEs
calibrar.Rcheck/00check.log:Status: OK
CatDyn.Rcheck/00check.log:Status: 1 NOTE
CensSpatial.Rcheck/00check.log:Status: OK
CJAMP.Rcheck/00check.log:Status: OK
Countr.Rcheck/00check.log:Status: 1 NOTE
dimRed.Rcheck/00check.log:Status: OK
ecd.Rcheck/00check.log:Status: OK
embryogrowth.Rcheck/00check.log:Status: 1 NOTE
gear.Rcheck/00check.log:Status: OK
heemod.Rcheck/00check.log:Status: OK
invGauss.Rcheck/00check.log:Status: 2 NOTEs
IRTpp.Rcheck/00check.log:Status: 1 NOTE
languageR.Rcheck/00check.log:Status: 3 NOTEs
lava.Rcheck/00check.log:Status: OK
ldhmm.Rcheck/00check.log:Status: OK
LifeHist.Rcheck/00check.log:Status: OK
LIHNPSD.Rcheck/00check.log:Status: 3 NOTEs
lme4.Rcheck/00check.log:Status: 1 NOTE
macc.Rcheck/00check.log:Status: OK
marked.Rcheck/00check.log:Status: OK
midasr.Rcheck/00check.log:Status: OK
monmlp.Rcheck/00check.log:Status: OK
mrds.Rcheck/00check.log:Status: OK
mvord.Rcheck/00check.log:Status: OK
nlmrt.Rcheck/00check.log:Status: OK
NormalGamma.Rcheck/00check.log:Status: 2 NOTEs
parfm.Rcheck/00check.log:Status: OK
PartCensReg.Rcheck/00check.log:Status: OK
phenology.Rcheck/00check.log:Status: OK
QuantumClone.Rcheck/00check.log:Status: OK
RandomFields.Rcheck/00check.log:Status: 1 NOTE
rankdist.Rcheck/00check.log:Status: OK
regsem.Rcheck/00check.log:Status: OK
REndo.Rcheck/00check.log:Status: 1 NOTE
ROI.plugin.optimx.Rcheck/00check.log:Status: OK
sgt.Rcheck/00check.log:Status: OK
spfrontier.Rcheck/00check.log:Status: OK
surrosurv.Rcheck/00check.log:Status: 1 WARNING, 1 NOTE
Synth.Rcheck/00check.log:Status: 2 NOTEs

The 1 WARNING is a result of optimx now subsuming functions
from package optextras as should be happening, namely,

Found the following significant warnings:
  Warning: replacing previous import ‘optextras::gHgenb’ by ‘optimx::gHgenb’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::hesschk’ by ‘optimx::hesschk’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::grback’ by ‘optimx::grback’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::grcentral’ by ‘optimx::grcentral’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::grnd’ by ‘optimx::grnd’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::gHgen’ by ‘optimx::gHgen’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::axsearch’ by ‘optimx::axsearch’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::optsp’ by ‘optimx::optsp’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::bmstep’ by ‘optimx::bmstep’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::scalechk’ by ‘optimx::scalechk’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::grchk’ by ‘optimx::grchk’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::bmchk’ by ‘optimx::bmchk’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::fnchk’ by ‘optimx::fnchk’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::grfwd’ by ‘optimx::grfwd’ when loading ‘surrosurv’
  Warning: replacing previous import ‘optextras::kktchk’ by ‘optimx::kktchk’ when loading ‘surrosurv’



More information about the R-package-devel mailing list