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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: expectedInf
> ### Title: Expected Influence
> ### Aliases: expectedInf
> 
> ### ** Examples
> 
> out1 <- expectedInf(cor(depression[,1:5]))
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
networktools
 --- call from context --- 
coerce_to_adjacency(network, directed = directed)
 --- call from argument --- 
if (class(input) == "igraph") {
    if (is.null(E(input)$weight)) {
        mat <- as.matrix(igraph::get.adjacency(input, type = "both"))
    }
    else {
        mat <- as.matrix(igraph::get.adjacency(input, type = "both", 
            attr = "weight"))
    }
    if (is.null(directed)) {
        directed <- igraph::is_directed(input)
    }
} else if (class(input) == "qgraph") {
    col1 <- input$Edgelist$from
    col3 <- input$Edgelist$to
    edgelist <- as.data.frame(cbind(col1, col3, input$Edgelist$weight))
    if (is.null(input$graphAttributes$Nodes$names) | input$graphAttributes$Nodes$names[1] == 
        TRUE) {
        nodes <- 1:length(unique(c(col1, col3)))
    }
    else {
        nodes <- input$graphAttributes$Nodes$names
    }
    mat <- matrix(0, length(nodes), length(nodes))
    colnames(mat) <- rownames(mat) <- nodes
    mat[as.matrix(edgelist)[, 1:2]] <- edgelist[, 3]
    if (is.null(directed)) {
        if (TRUE %in% input$Edgelist$directed) {
            directed <- TRUE
        }
        else {
            directed <- FALSE
        }
    }
    if (!directed) {
        mat <- mat + t(mat)
    }
} else if (dim(input)[1] == dim(input)[2]) {
    mat <- as.matrix(input)
    if (is.null(directed)) {
        if (sum(mat[upper.tri(mat)], na.rm = T) == 0 | sum(mat[lower.tri(mat)], 
            na.rm = T) == 0) {
            directed <- FALSE
            mat[is.na(mat)] <- 0
            mat_t <- t(mat)
            diag(mat_t) <- 0
            mat <- mat + mat_t
        }
        else {
            directed <- !isSymmetric(unname(mat))
        }
    }
    if (is.null(rownames(mat)) & is.null(colnames(mat))) {
        colnames(mat) <- rownames(mat) <- paste("node", 1:dim(mat)[2], 
            sep = "")
    }
    else if (is.null(rownames(mat))) {
        rownames(mat) <- colnames(mat)
    }
    else if (is.null(colnames(mat))) {
        colnames(mat) <- rownames(mat)
    }
    else if (TRUE %in% c(rownames(mat) != colnames(mat))) {
        rownames(mat) <- colnames(mat)
    }
} else {
    stop("Invalid input: please use an object of class qgraph, igraph, or an adjacency matrix")
}
 --- R stacktrace ---
where 1: coerce_to_adjacency(network, directed = directed)
where 2: expectedInf(cor(depression[, 1:5]))

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (input, directed = NULL) 
{
    if (class(input) == "igraph") {
        if (is.null(E(input)$weight)) {
            mat <- as.matrix(igraph::get.adjacency(input, type = "both"))
        }
        else {
            mat <- as.matrix(igraph::get.adjacency(input, type = "both", 
                attr = "weight"))
        }
        if (is.null(directed)) {
            directed <- igraph::is_directed(input)
        }
    }
    else if (class(input) == "qgraph") {
        col1 <- input$Edgelist$from
        col3 <- input$Edgelist$to
        edgelist <- as.data.frame(cbind(col1, col3, input$Edgelist$weight))
        if (is.null(input$graphAttributes$Nodes$names) | input$graphAttributes$Nodes$names[1] == 
            TRUE) {
            nodes <- 1:length(unique(c(col1, col3)))
        }
        else {
            nodes <- input$graphAttributes$Nodes$names
        }
        mat <- matrix(0, length(nodes), length(nodes))
        colnames(mat) <- rownames(mat) <- nodes
        mat[as.matrix(edgelist)[, 1:2]] <- edgelist[, 3]
        if (is.null(directed)) {
            if (TRUE %in% input$Edgelist$directed) {
                directed <- TRUE
            }
            else {
                directed <- FALSE
            }
        }
        if (!directed) {
            mat <- mat + t(mat)
        }
    }
    else if (dim(input)[1] == dim(input)[2]) {
        mat <- as.matrix(input)
        if (is.null(directed)) {
            if (sum(mat[upper.tri(mat)], na.rm = T) == 0 | sum(mat[lower.tri(mat)], 
                na.rm = T) == 0) {
                directed <- FALSE
                mat[is.na(mat)] <- 0
                mat_t <- t(mat)
                diag(mat_t) <- 0
                mat <- mat + mat_t
            }
            else {
                directed <- !isSymmetric(unname(mat))
            }
        }
        if (is.null(rownames(mat)) & is.null(colnames(mat))) {
            colnames(mat) <- rownames(mat) <- paste("node", 1:dim(mat)[2], 
                sep = "")
        }
        else if (is.null(rownames(mat))) {
            rownames(mat) <- colnames(mat)
        }
        else if (is.null(colnames(mat))) {
            colnames(mat) <- rownames(mat)
        }
        else if (TRUE %in% c(rownames(mat) != colnames(mat))) {
            rownames(mat) <- colnames(mat)
        }
    }
    else {
        stop("Invalid input: please use an object of class qgraph, igraph, or an adjacency matrix")
    }
    attr(mat, "directed") <- directed
    return(mat)
}
<bytecode: 0xb10f0f0>
<environment: namespace:networktools>
 --- function search by body ---
Function coerce_to_adjacency in namespace networktools has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(input) == "igraph") { : the condition has length > 1
Calls: expectedInf -> coerce_to_adjacency
Execution halted