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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: CIGofVAR1
> ### Title: Conditional independence graphs of the VAR(1) model
> ### Aliases: CIGofVAR1
> 
> ### ** Examples
> 
> # specify VAR(1) model parameters
> A <- matrix(c(-0.1, -0.3,    0, 
+                0.5,    0,    0, 
+                  0,    0, -0.4), byrow=TRUE, ncol=3)
> P <- matrix(c(   1,  0.5,    0, 
+                0.5,    1,    0,  
+                  0,    0,    1), byrow=TRUE, ncol=3)
> 
> # adjacency matrix of (global) conditional independencies.
> CIGofVAR1(A, P, type="global")
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
ragt2ridges
 --- call from context --- 
CIGofVAR1(A, P, type = "global")
 --- call from argument --- 
if (as.character(class(sparseA)) != "matrix") {
    stop("Input (sparseA) is of wrong class.")
}
 --- R stacktrace ---
where 1: CIGofVAR1(A, P, type = "global")

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (sparseA, sparseP, type = "global") 
{
    if (as.character(class(sparseA)) != "matrix") {
        stop("Input (sparseA) is of wrong class.")
    }
    if (nrow(sparseA) != ncol(sparseA)) {
        stop("Matrix sparseA is not square.")
    }
    if (as.character(class(sparseP)) != "matrix") {
        stop("Input (sparseP) is of wrong class.")
    }
    if (nrow(sparseP) != ncol(sparseP)) {
        stop("Matrix sparseP is not square.")
    }
    if (nrow(sparseA) != ncol(sparseP)) {
        stop("Matrix sparseA and sparseP are of equal dimensions.")
    }
    if (as.character(class(type)) != "character") {
        stop("Input (type) is of wrong class.")
    }
    if (!(type %in% c("global", "contemp"))) {
        stop("Input (type) ill-specified.")
    }
    if (type == "global") {
        CIG <- abs(t(sparseA) %*% sparseP) + abs(sparseP %*% 
            sparseA) + abs(t(sparseA) %*% sparseP %*% sparseA)
        diag(sparseP) <- 0
        CIG <- CIG + abs(sparseP)
        CIG[CIG != 0] <- 1
    }
    if (type == "contemp") {
        diag(sparseP) <- 0
        CIG <- abs(sparseP)
        CIG[CIG != 0] <- 1
    }
    return(CIG)
}
<bytecode: 0x6b68cd8>
<environment: namespace:ragt2ridges>
 --- function search by body ---
Function CIGofVAR1 in namespace ragt2ridges has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1