in the check environment to the effect that conditions of length greater
than one in 'if' and 'while' statements executing in the package being
checked give an error.
The NEWS for current r-devel contains
matrix objects now also inherit from class "array", namely, e.g.,
class(diag(1)) is c("matrix", "array") which invalidates code
assuming that length(class(obj)) == 1, an incorrect assumption that
is less frequently fulfilled now.
Apparently your package no longer works correctly when
class(matrix(...)) gives a vector of length two and conditions of length
greater than one in 'if' or 'while' give an error: please fix as
necessary.
Please correct before 2020-02-15 to safely retain your package on CRAN.
Note that this will be the final reminder.
Best,
-k
By following the links, it seems like the below from R/dynrCook.R is the problem
if (class(V1) == "try-error") {
failHess <- failHess + 1
warning("Hessian is not invertible; used pseudo-inverse.\nModel might not be identified or is not at an optimal solution.\nRegard standard errors suspiciously.",
call. = FALSE)
V1 <- MASS::ginv(useHess)
}
We need to change the line class(V1) == "try-error" which assume that length(class(V1)) == 1.
As maintainer, I received the following email from CRAN:
By following the links, it seems like the below from
R/dynrCook.R
is the problemWe need to change the line
class(V1) == "try-error"
which assume thatlength(class(V1)) == 1
.