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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: genComplResid
> ### Title: genComplResid
> ### Aliases: genComplResid
> 
> ### ** Examples
> 
> data(simGyriq)
> for (i in seq_along(simGyriq)) assign(names(simGyriq)[i], simGyriq[[i]])
> 
> cr <- genComplResid(U, Delta, Phi, blkID, m=50, X)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
gyriq
 --- call from context --- 
genComplResid(U, Delta, Phi, blkID, m = 50, X)
 --- call from argument --- 
if (class(Phi) != "matrix") stop("Phi is not a matrix")
 --- R stacktrace ---
where 1: genComplResid(U, Delta, Phi, blkID, m = 50, X)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (U, Delta, Phi, blkID, m = 50, X = NULL) 
{
    if (class(Phi) != "matrix") 
        stop("Phi is not a matrix")
    if (nrow(Phi) != ncol(Phi)) 
        stop("Phi is not a square matrix")
    if (sum(is.na(U)) != 0) 
        stop("U cannot have any missing values")
    if (sum(is.na(Delta)) != 0) 
        stop("Delta cannot have any missing values")
    if (sum(is.na(Phi)) != 0) 
        stop("Phi cannot have any missing values")
    if (sum(is.na(blkID)) != 0) 
        stop("blkID cannot have any missing values")
    if (length(U) != length(Delta)) 
        stop("Dimensions of U and Delta do not match")
    if (length(U) != nrow(Phi)) 
        stop("Dimensions of U and Phi do not match")
    if (length(U) != length(blkID)) 
        stop("Dimensions of U and blkID do not match")
    blkCens <- aggregate(x = 1 - Delta, by = list(blkID), FUN = sum)$x
    if (max(blkCens) > 1000) 
        stop("The number of censored individuals in each correlated group of\n             observations identified by the vector 'blkID' cannot exceed 1000.")
    if (is.null(X) == TRUE) {
        covPar <- NULL
        covTerm <- rep(0, length(U))
    }
    else {
        if (class(X) != "matrix") 
            stop("X is not a matrix")
        if (length(U) != nrow(X)) 
            stop("Dimensions of U and X do not match")
        if (sum(apply(X, 2, chkVariation)) != ncol(X)) 
            stop("One of the covariates in X has no variation")
        fit <- survival::coxph(survival::Surv(U, Delta) ~ X)
        covPar <- fit$coef
        covTerm <- as.vector(X %*% covPar)
    }
    rawResid <- estimRawResid(U = U, Delta = Delta, covTerm = covTerm)
    herit <- estimHeritPar(rawResid = rawResid, Delta = Delta, 
        Phi = Phi, blkID = blkID)
    Gam <- herit * Phi + (1 - herit) * diag(rep(1, dim(Phi)[1]))
    if (sum(Delta) == length(Delta)) {
        GamEig <- eigen(Gam)
        GamEigVal <- GamEig$values
        GamSqrt <- GamEig$vectors %*% diag(sqrt(GamEigVal)) %*% 
            solve(GamEig$vectors)
        compResid <- as.vector(solve(GamSqrt) %*% rawResid)
    }
    else {
        compResid <- imputeResid(rawResid = rawResid, Delta = Delta, 
            Gam = Gam, m = m, blkID = blkID)
    }
    return(list(compResid = compResid, herit = herit, covPar = covPar))
}
<bytecode: 0xaad2a38>
<environment: namespace:gyriq>
 --- function search by body ---
Function genComplResid in namespace gyriq has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Phi) != "matrix") stop("Phi is not a matrix") : 
  the condition has length > 1
Calls: genComplResid
Execution halted