Running examples in ‘simPATHy-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: plotCorGraph
> ### Title: Plot correlation or partial correlation matrix
> ### Aliases: plotCorGraph
> 
> ### ** Examples
> 
> if( require(gRbase) & require(graph)){
+  graph <- gRbase::ug(~a:b, ~a:c, ~c:d, ~b:d, ~b:c)
+ 
+  S <- matrix(c(2,  0.8,0.5,-0.3,
+               0.8,1.5,0.6,-0.7,
+               0.5,0.6,1,  0.7,
+               -0.3,-0.7,0.7,3), ncol=4,nrow=4)
+  colnames(S) <- rownames(S) <- graph::nodes(graph)
+ 
+  # Plot the correlation matrix of S
+  plotCorGraph(S)
+ 
+ 
+  S<-fitSgraph(graph = graph,S = S)
+  # Change the color range
+  plotCorGraph(S, colLim=c(-0.5,0.5))
+ 
+  # Visualize the adjacency matrix
+  plotCorGraph(S, type="cor", graph = graph)
+ 
+  # Show the partial correlation matrix
+  plotCorGraph(S, type="pcor", graph = graph)
+ 
+  # Plot the difference between two matrices
+  S2 <- S
+  # Change the element c~a
+  S2["a","c"] <- S2["c","a"]<- -0.1
+  plotCorGraph(S1=S, S2=S2)
+  plotCorGraph(S1=S, S2=S2, type="pcor")
+ 
+  S2<-fitSgraph(graph = graph,S = S2)
+  # Highlight the graphical structure
+  plotCorGraph(S1=S, S2=S2, type="pcor",graph = graph)
+  # Highlight the element c~a
+  plotCorGraph(S1=S, S2=S2, type="pcor",graph = graph,path = list(c("a","c")))
+ 
+ }
Loading required package: gRbase
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:stats’:

    IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which, which.max, which.min

 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
simPATHy
 --- call from context --- 
checkMatrix(S1, name = deparse(substitute(S1)))
 --- call from argument --- 
if (!(class(M) == "matrix")) stop(paste0(name, " must be class matrix"))
 --- R stacktrace ---
where 1: checkMatrix(S1, name = deparse(substitute(S1)))
where 2: plotCorGraph(S)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (M, name) 
{
    if (!(class(M) == "matrix")) 
        stop(paste0(name, " must be class matrix"))
    if (!(ncol(M) == nrow(M))) 
        stop(paste0("the matrix ", name, " are not square"))
    if (!all(rownames(M) == colnames(M))) 
        stop(paste0(name, ": column and row elements must be equal"))
}
<bytecode: 0x564bb7be33f8>
<environment: namespace:simPATHy>
 --- function search by body ---
Function checkMatrix in namespace simPATHy has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1