Running examples in 'greybox-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: alm
> ### Title: Advanced Linear Model
> ### Aliases: alm
> ### Keywords: models nonlinear regression ts
> 
> ### ** Examples
> 
> 
> ### An example with mtcars data and factors
> mtcars2 <- within(mtcars, {
+    vs <- factor(vs, labels = c("V", "S"))
+    am <- factor(am, labels = c("automatic", "manual"))
+    cyl  <- ordered(cyl)
+    gear <- ordered(gear)
+    carb <- ordered(carb)
+ })
> # The standard model with Log Normal distribution
> ourModel <- alm(mpg~., mtcars2[1:30,], distribution="dlnorm")
> summary(ourModel)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
greybox
 --- call from context --- 
vcov.alm(object)
 --- call from argument --- 
if (class(vcovMatrixTry) == "try-error") {
    warning(paste0("Choleski decomposition of covariance matrix failed, so we had to revert to the simple inversion.\n", 
        "The estimate of the covariance matrix of parameters might be inaccurate."), 
        call. = FALSE)
    vcovMatrix <- try(solve(matrixXreg, diag(nVariables), tol = 1e-20), 
        silent = TRUE)
    if (class(vcovMatrix) == "try-error") {
        warning(paste0("Sorry, but the covariance matrix is singular, so we could not invert it.\n", 
            "We failed to produce the covariance matrix of parameters."), 
            call. = FALSE)
        vcovMatrix <- diag(1e+100, nVariables)
    }
} else {
    vcovMatrix <- vcovMatrixTry
}
 --- R stacktrace ---
where 1: vcov.alm(object)
where 2: vcov(object)
where 3: diag(vcov(object))
where 4: confint.alm(object, level = level)
where 5: confint(object, level = level)
where 6: summary.alm(ourModel)
where 7: summary(ourModel)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (object, ...) 
{
    iOrderNone <- is.null(object$call$i) || (object$call$i == 
        0)
    interceptIsNeeded <- any(names(coef(object)) == "(Intercept)")
    if (iOrderNone & any(object$distribution == c("dlnorm", "dbcnorm", 
        "plogis", "pnorm"))) {
        matrixXreg <- object$data[object$subset, -1, drop = FALSE]
        if (interceptIsNeeded) {
            matrixXreg <- cbind(1, matrixXreg)
            colnames(matrixXreg)[1] <- "(Intercept)"
        }
        nVariables <- ncol(matrixXreg)
        matrixXreg <- crossprod(matrixXreg)
        vcovMatrixTry <- try(chol2inv(chol(matrixXreg)), silent = TRUE)
        if (class(vcovMatrixTry) == "try-error") {
            warning(paste0("Choleski decomposition of covariance matrix failed, so we had to revert to the simple inversion.\n", 
                "The estimate of the covariance matrix of parameters might be inaccurate."), 
                call. = FALSE)
            vcovMatrix <- try(solve(matrixXreg, diag(nVariables), 
                tol = 1e-20), silent = TRUE)
            if (class(vcovMatrix) == "try-error") {
                warning(paste0("Sorry, but the covariance matrix is singular, so we could not invert it.\n", 
                  "We failed to produce the covariance matrix of parameters."), 
                  call. = FALSE)
                vcovMatrix <- diag(1e+100, nVariables)
            }
        }
        else {
            vcovMatrix <- vcovMatrixTry
        }
        vcov <- object$scale^2 * vcovMatrix
        rownames(vcov) <- colnames(vcov) <- names(coef(object))
    }
    else if (iOrderNone & (object$distribution == "dnorm")) {
        matrixXreg <- object$data[object$subset, -1, drop = FALSE]
        if (interceptIsNeeded) {
            matrixXreg <- cbind(1, matrixXreg)
            colnames(matrixXreg)[1] <- "(Intercept)"
        }
        matrixXreg <- crossprod(matrixXreg)
        vcovMatrixTry <- try(chol2inv(chol(matrixXreg)), silent = TRUE)
        if (class(vcovMatrixTry) == "try-error") {
            warning(paste0("Choleski decomposition of covariance matrix failed, so we had to revert to the simple inversion.\n", 
                "The estimate of the covariance matrix of parameters might be inaccurate."), 
                call. = FALSE)
            vcovMatrix <- try(solve(matrixXreg, diag(nVariables), 
                tol = 1e-20), silent = TRUE)
            if (class(vcovMatrix) == "try-error") {
                warning(paste0("Sorry, but the covariance matrix is singular, so we could not invert it.\n", 
                  "We failed to produce the covariance matrix of parameters."), 
                  call. = FALSE)
                vcovMatrix <- diag(1e+100, nVariables)
            }
        }
        else {
            vcovMatrix <- vcovMatrixTry
        }
        vcov <- sigma(object)^2 * vcovMatrix
        rownames(vcov) <- colnames(vcov) <- names(coef(object))
    }
    else {
        newCall <- object$call
        if (interceptIsNeeded) {
            newCall$formula <- as.formula(paste0(all.vars(newCall$formula)[1], 
                "~."))
        }
        else {
            newCall$formula <- as.formula(paste0(all.vars(newCall$formula)[1], 
                "~.-1"))
        }
        newCall$data <- object$data
        newCall$subset <- object$subset
        newCall$distribution <- object$distribution
        newCall$ar <- object$call$ar
        newCall$i <- object$call$i
        newCall$parameters <- coef(object)
        newCall$fast <- TRUE
        if (any(object$distribution == c("dchisq", "dt"))) {
            newCall$df <- object$other$df
        }
        else if (object$distribution == "dnbinom") {
            newCall$size <- object$other$size
        }
        else if (object$distribution == "dalaplace") {
            newCall$alpha <- object$other$alpha
        }
        else if (object$distribution == "dfnorm") {
            newCall$sigma <- object$other$sigma
        }
        else if (object$distribution == "dbcnorm") {
            newCall$lambda <- object$other$lambda
        }
        newCall$vcovProduce <- TRUE
        newCall$occurrence <- object$occurrence
        vcov <- eval(newCall)$vcov
        if (!is.matrix(vcov)) {
            vcov <- as.matrix(vcov)
            colnames(vcov) <- rownames(vcov)
        }
    }
    return(vcov)
}
<bytecode: 0x321c3d0>
<environment: namespace:greybox>
 --- function search by body ---
Function vcov.alm in namespace greybox has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1