CRAN Package Check Results for Package networktools

Last updated on 2020-02-15 01:01:31 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.2.1 15.59 131.21 146.80 ERROR
r-devel-linux-x86_64-debian-gcc 1.2.1 14.51 99.57 114.08 ERROR
r-devel-linux-x86_64-fedora-clang 1.2.2 170.34 OK
r-devel-linux-x86_64-fedora-gcc 1.2.2 173.40 OK
r-devel-windows-ix86+x86_64 1.2.1 50.00 144.00 194.00 OK
r-devel-windows-ix86+x86_64-gcc8 1.2.1 66.00 208.00 274.00 OK
r-patched-linux-x86_64 1.2.2 11.63 106.42 118.05 OK
r-patched-solaris-x86 1.2.2 234.00 OK
r-release-linux-x86_64 1.2.1 11.66 113.01 124.67 OK
r-release-windows-ix86+x86_64 1.2.1 38.00 128.00 166.00 OK
r-release-osx-x86_64 1.2.1 OK
r-oldrel-windows-ix86+x86_64 1.2.1 23.00 133.00 156.00 OK
r-oldrel-osx-x86_64 1.2.1 OK

Check Details

Version: 1.2.1
Check: Rd \usage sections
Result: WARN
    Documented arguments not in \usage in documentation object 'impact.NCT':
     '...'
    
    Functions with \usage entries need to have the appropriate \alias
    entries, and all their arguments documented.
    The \usage entries must correspond to syntactically valid R code.
    See chapter 'Writing R documentation files' in the 'Writing R
    Extensions' manual.
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc

Version: 1.2.1
Check: examples
Result: ERROR
    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: 0xc996650>
    <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
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.2.1
Check: examples
Result: ERROR
    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: 0x564212b7df80>
    <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
Flavor: r-devel-linux-x86_64-debian-gcc