CRAN Package Check Results for Package sna

Last updated on 2019-12-09 22:51:26 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 2.4 24.53 101.82 126.35 ERROR
r-devel-linux-x86_64-debian-gcc 2.4 19.89 101.27 121.16 OK
r-devel-linux-x86_64-fedora-clang 2.4 177.54 NOTE
r-devel-linux-x86_64-fedora-gcc 2.4 175.44 NOTE
r-devel-windows-ix86+x86_64 2.4 45.00 232.00 277.00 OK
r-devel-windows-ix86+x86_64-gcc8 2.4 48.00 235.00 283.00 OK
r-patched-linux-x86_64 2.4 21.37 111.74 133.11 OK
r-patched-solaris-x86 2.4 209.50 OK
r-release-linux-x86_64 2.4 21.73 115.43 137.16 OK
r-release-windows-ix86+x86_64 2.4 43.00 159.00 202.00 OK
r-release-osx-x86_64 2.4 FAIL
r-oldrel-windows-ix86+x86_64 2.4 41.00 159.00 200.00 OK
r-oldrel-osx-x86_64 2.4 OK

Check Details

Version: 2.4
Check: examples
Result: ERROR
    Running examples in 'sna-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: add.isolates
    > ### Title: Add Isolates to a Graph
    > ### Aliases: add.isolates
    > ### Keywords: manip math graphs
    >
    > ### ** Examples
    >
    >
    > g<-rgraph(10,5) #Produce some random graphs
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    sna
     --- call from context ---
    FUN(X[[i]], ...)
     --- call from argument ---
    if (class(x) %in% c("matrix.csr", "matrix.csc", "matrix.ssr",
     "matrix.ssc", "matrix.hb")) {
     requireNamespace("SparseM")
     bip <- attr(x, "bipartite")
     g <- as.matrix(x)
     attr(g, "bipartite") <- bip
    } else {
     n <- attr(x, "n")
     bip <- attr(x, "bipartite")
     vnam <- attr(x, "vnames")
     if (is.array(x) && (length(dim(x)) == 2))
     x <- as.matrix(x)
     if (is.data.frame(x))
     x <- as.matrix(x)
     if (is.matrix(x)) {
     if ((NCOL(x) %in% c(2, 3)) && (!is.null(n))) {
     if (NCOL(x) == 2)
     x <- cbind(x, rep(1, NROW(x)))
     g <- matrix(0, n, n)
     if (NROW(x) > 0)
     g[x[, 1:2, drop = FALSE]] <- x[, 3]
     rownames(g) <- vnam
     colnames(g) <- vnam
     }
     else if (force.bipartite || (!is.null(bip)) || (NROW(x) !=
     NCOL(x))) {
     nr <- NROW(x)
     nc <- NCOL(x)
     g <- matrix(0, nr + nc, nr + nc)
     g[1:nr, (nr + 1):(nr + nc)] <- x
     g[(nr + 1):(nr + nc), 1:nr] <- t(x)
     rownames(g) <- vnam
     colnames(g) <- vnam
     }
     else {
     g <- x
     }
     }
     else if (is.array(x)) {
     if (length(dim(x)) != 3)
     stop("as.sociomatrix.sna input must be an adjacency matrix/array, network, data frame, sparse matrix, or list.")
     if (force.bipartite || (!is.null(attr(x, "bipartite"))) ||
     (dim(x)[2] != dim(x)[3])) {
     dx <- dim(x)
     nr <- dx[2]
     nc <- dx[3]
     g <- array(0, dim = c(dx[1], nr + nc, nr + nc))
     for (i in 1:dx[1]) {
     g[i, 1:nr, (nr + 1):(nr + nc)] <- x[i, , ]
     g[i, (nr + 1):(nr + nc), 1:nr] <- t(x[i, , ])
     }
     }
     else {
     g <- x
     }
     }
     else {
     stop("as.sociomatrix.sna input must be an adjacency matrix/array, network, or list.")
     }
    }
     --- R stacktrace ---
    where 1: FUN(X[[i]], ...)
    where 2: lapply(x, as.sociomatrix.sna, attrname = attrname, simplify = simplify,
     force.bipartite = force.bipartite)
    where 3: as.sociomatrix.sna(g)
    where 4: rgraph(10, 5)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (x, attrname = NULL, simplify = TRUE, force.bipartite = FALSE)
    {
     if ((is.list(x) && !any(class(x) == "network")) && (!(class(x) %in%
     c("network", "matrix.csr", "matrix.csc", "matrix.ssr",
     "matrix.ssc", "matrix.hb", "data.frame")))) {
     g <- lapply(x, as.sociomatrix.sna, attrname = attrname,
     simplify = simplify, force.bipartite = force.bipartite)
     }
     else if (any(class(x) == "network")) {
     g <- as.sociomatrix(x, attrname = attrname, simplify = simplify)
     }
     else if (class(x) %in% c("matrix.csr", "matrix.csc", "matrix.ssr",
     "matrix.ssc", "matrix.hb")) {
     requireNamespace("SparseM")
     bip <- attr(x, "bipartite")
     g <- as.matrix(x)
     attr(g, "bipartite") <- bip
     }
     else {
     n <- attr(x, "n")
     bip <- attr(x, "bipartite")
     vnam <- attr(x, "vnames")
     if (is.array(x) && (length(dim(x)) == 2))
     x <- as.matrix(x)
     if (is.data.frame(x))
     x <- as.matrix(x)
     if (is.matrix(x)) {
     if ((NCOL(x) %in% c(2, 3)) && (!is.null(n))) {
     if (NCOL(x) == 2)
     x <- cbind(x, rep(1, NROW(x)))
     g <- matrix(0, n, n)
     if (NROW(x) > 0)
     g[x[, 1:2, drop = FALSE]] <- x[, 3]
     rownames(g) <- vnam
     colnames(g) <- vnam
     }
     else if (force.bipartite || (!is.null(bip)) || (NROW(x) !=
     NCOL(x))) {
     nr <- NROW(x)
     nc <- NCOL(x)
     g <- matrix(0, nr + nc, nr + nc)
     g[1:nr, (nr + 1):(nr + nc)] <- x
     g[(nr + 1):(nr + nc), 1:nr] <- t(x)
     rownames(g) <- vnam
     colnames(g) <- vnam
     }
     else {
     g <- x
     }
     }
     else if (is.array(x)) {
     if (length(dim(x)) != 3)
     stop("as.sociomatrix.sna input must be an adjacency matrix/array, network, data frame, sparse matrix, or list.")
     if (force.bipartite || (!is.null(attr(x, "bipartite"))) ||
     (dim(x)[2] != dim(x)[3])) {
     dx <- dim(x)
     nr <- dx[2]
     nc <- dx[3]
     g <- array(0, dim = c(dx[1], nr + nc, nr + nc))
     for (i in 1:dx[1]) {
     g[i, 1:nr, (nr + 1):(nr + nc)] <- x[i, , ]
     g[i, (nr + 1):(nr + nc), 1:nr] <- t(x[i, ,
     ])
     }
     }
     else {
     g <- x
     }
     }
     else {
     stop("as.sociomatrix.sna input must be an adjacency matrix/array, network, or list.")
     }
     }
     if (is.list(g)) {
     if (length(g) == 1) {
     g <- g[[1]]
     if ((!simplify) && (length(dim(g)) == 3)) {
     out <- list()
     for (i in 1:dim(g)[1]) out[[i]] <- g[i, , ]
     }
     else {
     out <- g
     }
     }
     else {
     if (simplify) {
     dims <- sapply(g, dim)
     if (is.list(dims)) {
     mats <- sapply(dims, length)
     mats[mats == 1] <- 0
     mats[mats == 2] <- 1
     mats[mats == 3] <- sapply(dims[mats == 3],
     "[[", 1)
     mats <- cumsum(mats)
     dims <- sapply(dims, "[", 2)
     }
     else {
     if (NROW(dims) == 3)
     mats <- cumsum(dims[1, ])
     else mats <- 1:NCOL(dims)
     dims <- dims[2, ]
     }
     if ((!any(is.null(dims))) && (length(unique(dims)) ==
     1) && (all(mats > 0))) {
     out <- array(dim = c(mats[length(mats)], dims[1],
     dims[1]))
     for (i in 1:length(mats)) out[(c(0, mats)[i] +
     1):(mats[i]), , ] <- g[[i]]
     }
     else out <- g
     }
     else out <- g
     }
     }
     else {
     if ((!simplify) && (length(dim(g)) == 3)) {
     out <- list()
     for (i in 1:dim(g)[1]) out[[i]] <- g[i, , ]
     }
     else out <- g
     }
     out
    }
    <bytecode: 0x2a1c2f0>
    <environment: namespace:sna>
     --- function search by body ---
    Function as.sociomatrix.sna in namespace sna has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(x) %in% c("matrix.csr", "matrix.csc", "matrix.ssr", :
     the condition has length > 1
    Calls: rgraph -> as.sociomatrix.sna -> lapply -> FUN
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 2.4
Check: compiled code
Result: NOTE
    File ‘sna/libs/sna.so’:
     Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’
    
    It is good practice to register native routines and to disable symbol
    search.
    
    See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 2.4
Check: dependencies in R code
Result: FAIL
Flavor: r-release-osx-x86_64