CRAN Package Check Results for Package netdiffuseR

Last updated on 2019-12-21 10:47:52 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.20.2 150.47 319.15 469.62 ERROR
r-devel-linux-x86_64-debian-gcc 1.20.2 106.56 235.06 341.62 ERROR
r-devel-linux-x86_64-fedora-clang 1.20.2 597.28 NOTE
r-devel-linux-x86_64-fedora-gcc 1.20.2 674.08 OK
r-devel-windows-ix86+x86_64 1.20.2 368.00 287.00 655.00 NOTE --no-vignettes
r-devel-windows-ix86+x86_64-gcc8 1.20.2 363.00 283.00 646.00 NOTE --no-vignettes
r-patched-linux-x86_64 1.20.2 OK
r-patched-solaris-x86 1.20.2 579.70 OK
r-release-linux-x86_64 1.20.2 114.88 299.50 414.38 OK
r-release-windows-ix86+x86_64 1.20.2 272.00 359.00 631.00 NOTE --no-vignettes
r-release-osx-x86_64 1.20.2 NOTE
r-oldrel-windows-ix86+x86_64 1.20.2 246.00 332.00 578.00 NOTE --no-vignettes
r-oldrel-osx-x86_64 1.20.2 NOTE

Check Details

Version: 1.20.2
Check: examples
Result: ERROR
    Running examples in 'netdiffuseR-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: as_dgCMatrix
    > ### Title: Coerce a matrix-like objects to 'dgCMatrix' (sparse matrix)
    > ### Aliases: as_dgCMatrix as.dgCMatrix as_spmat as_dgCMatrix.default
    > ### as_dgCMatrix.diffnet as_dgCMatrix.array as_dgCMatrix.igraph
    > ### as_dgCMatrix.network as_dgCMatrix.list
    >
    > ### ** Examples
    >
    >
    > set.seed(1231)
    > x <- rgraph_er(10)
    >
    > # From matrix object
    > as_dgCMatrix(as.matrix(x))
    Error in apply(x, 3, methods::as, Class = "dgCMatrix") :
     'MARGIN' does not match dim(X)
    Calls: as_dgCMatrix -> as_dgCMatrix.array -> apply
    Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc

Version: 1.20.2
Check: tests
Result: ERROR
     Running 'testthat.R' [37s/39s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(netdiffuseR)
    
     Attaching package: 'netdiffuseR'
    
     The following object is masked from 'package:base':
    
     %*%
    
     >
     > Sys.setenv("R_TESTS" = "")
     >
     > test_check("netdiffuseR", reporter = "summary")
     Read/Write graphs edgelist to adjmat and vice-versa: ....1.2
     Bass Diffusion model: ...
     Network bootstrap: ........
     Cumulative adopt count, and hazard rate: ....
     Degree function: .................
     Diffnet class and methods: ................W...........
     Checking diffnet-indexing: ................
     plot_diffnet, threshold, and exposure: ........
     Threshold functions: .............
     Infectiousness and susceptibility (plot methods): ..........
     Other methods: ..................................
     Egonets: ..3....
     Foreign function: ........
     Diffusion Regression: ....
     Graph objects: ...............
     Silly tests for imports.R: .
     Infection and susceptibility: ................
     Mentor matching: ..
     Misc functions: .4
     Morans I: .
     C++ extra functions: ...
     Testing package .onLoad and options: ....
     Set of functions used in: plot_diffnet2: ........
     Random graphs: ................
     Random diffusion graphs: ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     netdiffuseR
     --- call from context ---
     rdiffnet_check_seed_graph(seed.graph, rgraph.args, t, n)
     --- call from argument ---
     if (test %in% c("matrix", "dgCMatrix", "array")) {
     if ("array" %in% test)
     sgraph <- apply(seed.graph, 3, function(x) methods::as(x,
     "dgCMatrix"))
     else sgraph <- methods::as(seed.graph, "dgCMatrix")
     } else if ("list" %in% test) {
     sgraph <- seed.graph
     } else if ("diffnet" %in% test) {
     sgraph <- seed.graph$graph
     } else stop("Invalid argument for -seed.graph-. No support for objects of class -",
     test, "-.")
     --- R stacktrace ---
     where 1: rdiffnet_check_seed_graph(seed.graph, rgraph.args, t, n)
     where 2 at testthat/test-rdiffnet.R#19: rdiffnet(seed.graph = as.array(x_dgCMatrix)[, , 1], t = 10, rewire.args = list(p = c(0,
     rep(0.1, 9))))
     where 3: eval(code, test_env)
     where 4: eval(code, test_env)
     where 5: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 6: doTryCatch(return(expr), name, parentenv, handler)
     where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 8: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 9: doTryCatch(return(expr), name, parentenv, handler)
     where 10: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 11: tryCatchList(expr, classes, parentenv, handlers)
     where 12: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 13: test_code(desc, code, env = parent.frame())
     where 14 at testthat/test-rdiffnet.R#6: test_that("Input", {
     set.seed(12312)
     x <- rgraph_ba(t = 500 - 1L)
     set.seed(131)
     x_dgCMatrix <- rdiffnet(seed.graph = x, t = 10, rewire.args = list(p = c(0,
     rep(0.1, 9))))
     set.seed(131)
     x_matrix <- rdiffnet(seed.graph = as.array(x_dgCMatrix)[,
     , 1], t = 10, rewire.args = list(p = c(0, rep(0.1, 9))))
     set.seed(12312)
     x <- function() {
     out <- rgraph_ba(t = 500 - 1L)
     set.seed(131)
     out
     }
     x_fun <- rdiffnet(seed.graph = x, t = 10, rewire.args = list(p = c(0,
     rep(0.1, 9))))
     x_dgCMatrix$graph <- as.array(x_dgCMatrix)
     x_matrix$graph <- as.array(x_matrix)
     x_fun$graph <- as.array(x_fun)
     expect_equal(x_dgCMatrix, x_matrix)
     expect_equal(x_dgCMatrix, x_fun)
     set.seed(12312)
     x <- rgraph_ba(t = 500 - 1L)
     x <- list(x, rewire_graph(x, 0.1))
     set.seed(131)
     x_dgCMatrix <- rdiffnet(seed.graph = x, rewire.args = list(p = 0))
     set.seed(131)
     x_matrix <- rdiffnet(seed.graph = as.array(x_dgCMatrix),
     rewire.args = list(p = 0))
     set.seed(131)
     x_diffnet <- rdiffnet(seed.graph = x_dgCMatrix, rewire.args = list(p = 0))
     x_dgCMatrix$graph <- as.array(x_dgCMatrix)
     x_matrix$graph <- as.array(x_matrix)
     x_diffnet$graph <- as.array(x_diffnet)
     expect_equal(x_dgCMatrix, x_matrix)
     expect_equal(x_dgCMatrix, x_diffnet)
     })
     where 15: eval(code, test_env)
     where 16: eval(code, test_env)
     where 17: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 18: doTryCatch(return(expr), name, parentenv, handler)
     where 19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 20: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 21: doTryCatch(return(expr), name, parentenv, handler)
     where 22: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 23: tryCatchList(expr, classes, parentenv, handlers)
     where 24: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 25: test_code(NULL, exprs, env)
     where 26: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 27: force(code)
     where 28: doWithOneRestart(return(expr), restart)
     where 29: withOneRestart(expr, restarts[[1L]])
     where 30: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 31: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 32: FUN(X[[i]], ...)
     where 33: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 34: force(code)
     where 35: doWithOneRestart(return(expr), restart)
     where 36: withOneRestart(expr, restarts[[1L]])
     where 37: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 38: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 39: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 40: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 41: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 42: test_check("netdiffuseR", reporter = "summary")
    
     --- value of length: 2 type: logical ---
     [1] TRUE TRUE
     --- function from context ---
     function (seed.graph, rgraph.args, t, n)
     {
     test <- class(seed.graph)
     if ("function" %in% test) {
     test <- seed.graph()
     if (inherits(test, "dgCMatrix")) {
     sgraph <- test
     }
     else if (inherits(test, "matrix")) {
     sgraph <- methods::as(test, "dgCMatrix")
     }
     else if (inherits(test, "array")) {
     sgraph <- apply(test, 3, function(x) methods::as(x,
     "dgCMatrix"))
     }
     else if (inherits(test, "diffnet")) {
     sgraph <- test$graph
     }
     else if (inherits(test, "list")) {
     sgraph <- test
     }
     }
     else if ("character" %in% test) {
     if (seed.graph == "scale-free") {
     if (!length(rgraph.args$m0))
     rgraph.args$t <- n - 1L
     sgraph <- do.call(rgraph_ba, rgraph.args)
     }
     else if (seed.graph == "bernoulli") {
     rgraph.args$n <- n
     sgraph <- do.call(rgraph_er, rgraph.args)
     }
     else if (seed.graph == "small-world") {
     rgraph.args$n <- n
     if (!length(rgraph.args$k))
     rgraph.args$k <- 2L
     if (!length(rgraph.args$p))
     rgraph.args$p <- 0.1
     sgraph <- do.call(rgraph_ws, rgraph.args)
     }
     else stop("Invalid -seed.graph-. It should be either ",
     "'scale-free', 'bernoulli' or 'small-world'.")
     graph <- rep(list(sgraph), t)
     }
     else if (test %in% c("matrix", "dgCMatrix", "array")) {
     if ("array" %in% test)
     sgraph <- apply(seed.graph, 3, function(x) methods::as(x,
     "dgCMatrix"))
     else sgraph <- methods::as(seed.graph, "dgCMatrix")
     }
     else if ("list" %in% test) {
     sgraph <- seed.graph
     }
     else if ("diffnet" %in% test) {
     sgraph <- seed.graph$graph
     }
     else stop("Invalid argument for -seed.graph-. No support for objects of class -",
     test, "-.")
     sgraph
     }
     <bytecode: 0xb479250>
     <environment: namespace:netdiffuseR>
     --- function search by body ---
     Function rdiffnet_check_seed_graph in namespace netdiffuseR has this body.
     ----------- END OF FAILURE REPORT --------------
     5.....
     Read/write foreign formats: ..
     Rewiring algorithms: ..........6..7
     Select ego/alter: ....
     Spatial functions (beta): ...
     Stats functions (including exposure): ...............................
     Structural equivalence: 8..9..
     Structural test: .S......
     Survey to diffnet: ...................
    
     == Skipped =====================================================================
     1. struct_test should be reproducible (parallel version) (@test-struct_test.R#23) - Reason: On CRAN
    
     == Warnings ====================================================================
     1. new_diffnet with different graph classes (@test-diffnet-class.R#174) - `diffnet.attrs(dn_arr, "hola") <- NULL` generated an S3 error and you are testing the error message.
     * The error has class = c("defunctError", "error", "condition")
     * Testing with `class` is more robust than testing with `regexp`.
     * Do you want `expect_error(..., class = "defunctError")`?
    
     == Failed ======================================================================
     -- 1. Error: Undirected static adjmat-edgelist-adjmat (should hold) - edgelist m
     EXPR must be a length 1 vector
     Backtrace:
     1. testthat::expect_equivalent(edgelist_recovered, adjmat_to_edgelist(as.matrix(adjmat))) test-adjmat.R:51:4
     4. netdiffuseR::adjmat_to_edgelist(as.matrix(adjmat))
    
     -- 2. Error: (unknown) (@test-adjmat.R#86) ------------------------------------
     EXPR must be a length 1 vector
     Backtrace:
     1. netdiffuseR::adjmat_to_edgelist(array_recovered, undirected = FALSE) test-adjmat.R:86:2
     2. netdiffuseR:::adjmat_to_edgelist.array(graph, undirected, keep.isolates)
     3. netdiffuseR:::adjmat_to_edgelist.matrix(...)
     4. netdiffuseR::nvertices(graph)
    
     -- 3. Error: Simple extraction throught clases (@test-egonets.R#44) -----------
     EXPR must be a length 1 vector
     Backtrace:
     1. netdiffuseR::egonet_attrs(...) test-egonets.R:44:2
     2. netdiffuseR::nnodes(graph)
    
     -- 4. Error: as_dgCMatrix works (@test-misc.R#25) -----------------------------
     'MARGIN' does not match dim(X)
     Backtrace:
     1. netdiffuseR::as_dgCMatrix(as.matrix(x)) test-misc.R:25:2
     2. netdiffuseR:::as_dgCMatrix.array(as.matrix(x))
     3. base::apply(x, 3, methods::as, Class = "dgCMatrix")
    
     -- 5. Error: Input (@test-rdiffnet.R#19) --------------------------------------
     the condition has length > 1
     Backtrace:
     1. netdiffuseR::rdiffnet(...) test-rdiffnet.R:19:2
     2. netdiffuseR:::rdiffnet_check_seed_graph(...)
    
     -- 6. Error: rewire_permute (@test-rewire.R#160) ------------------------------
     Not an S4 object.
     Backtrace:
     1. netdiffuseR::permute_graph(as.matrix(g)) test-rewire.R:160:15
     2. base::lapply(x, permute_graph_cpp, self = self, multiple = multiple)
     3. netdiffuseR:::FUN(X[[i]], ...)
    
     -- 7. Error: rewire_qap (@test-rewire.R#197) ----------------------------------
     EXPR must be a length 1 vector
     Backtrace:
     1. netdiffuseR::rewire_qap(as.matrix(g)) test-rewire.R:197:15
     4. netdiffuseR::nnodes(graph)
    
     -- 8. Error: Computation (@test-struct_equiv.R#11) ----------------------------
     EXPR must be a length 1 vector
     Backtrace:
     1. netdiffuseR::struct_equiv(graph) test-struct_equiv.R:11:2
    
     -- 9. Error: By group (@test-struct_equiv.R#77) -------------------------------
     'MARGIN' does not match dim(X)
     Backtrace:
     1. netdiffuseR::exposure(diffnet, alt.graph = "se", valued = TRUE) test-struct_equiv.R:77:2
     6. netdiffuseR:::as_dgCMatrix.list(graph)
     7. base::lapply(x, as_dgCMatrix, make.dimnames = make.dimnames)
     9. netdiffuseR:::as_dgCMatrix.array(X[[i]], ...)
     10. base::apply(x, 3, methods::as, Class = "dgCMatrix")
    
     == DONE ========================================================================
     Error: Test failures
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.20.2
Check: tests
Result: ERROR
     Running ‘testthat.R’ [27s/38s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(netdiffuseR)
    
     Attaching package: 'netdiffuseR'
    
     The following object is masked from 'package:base':
    
     %*%
    
     >
     > Sys.setenv("R_TESTS" = "")
     >
     > test_check("netdiffuseR", reporter = "summary")
     Read/Write graphs edgelist to adjmat and vice-versa: ....1.2
     Bass Diffusion model: ...
     Network bootstrap: ........
     Cumulative adopt count, and hazard rate: ....
     Degree function: .................
     Diffnet class and methods: ................W...........
     Checking diffnet-indexing: ................
     plot_diffnet, threshold, and exposure: ........
     Threshold functions: .............
     Infectiousness and susceptibility (plot methods): ..........
     Other methods: ..................................
     Egonets: ..3....
     Foreign function: ........
     Diffusion Regression: ....
     Graph objects: ...............
     Silly tests for imports.R: .
     Infection and susceptibility: ................
     Mentor matching: ..
     Misc functions: .4
     Morans I: .
     C++ extra functions: ...
     Testing package .onLoad and options: ....
     Set of functions used in: plot_diffnet2: ........
     Random graphs: ................
     Random diffusion graphs: W5.....
     Read/write foreign formats: ..
     Rewiring algorithms: ..........6..7
     Select ego/alter: ....
     Spatial functions (beta): ...
     Stats functions (including exposure): ...............................
     Structural equivalence: 8..9..
     Structural test: .S......
     Survey to diffnet: ...................
    
     ══ Skipped ═════════════════════════════════════════════════════════════════════
     1. struct_test should be reproducible (parallel version) (@test-struct_test.R#23) - Reason: On CRAN
    
     ══ Warnings ════════════════════════════════════════════════════════════════════
     1. new_diffnet with different graph classes (@test-diffnet-class.R#174) - `diffnet.attrs(dn_arr, "hola") <- NULL` generated an S3 error and you are testing the error message.
     * The error has class = c("defunctError", "error", "condition")
     * Testing with `class` is more robust than testing with `regexp`.
     * Do you want `expect_error(..., class = "defunctError")`?
    
     2. Input (@test-rdiffnet.R#19) - the condition has length > 1 and only the first element will be used
    
     ══ Failed ══════════════════════════════════════════════════════════════════════
     ── 1. Error: Undirected static adjmat-edgelist-adjmat (should hold) - edgelist m
     EXPR must be a length 1 vector
     Backtrace:
     1. testthat::expect_equivalent(edgelist_recovered, adjmat_to_edgelist(as.matrix(adjmat))) test-adjmat.R:51:4
     4. netdiffuseR::adjmat_to_edgelist(as.matrix(adjmat))
    
     ── 2. Error: (unknown) (@test-adjmat.R#86) ────────────────────────────────────
     EXPR must be a length 1 vector
     Backtrace:
     1. netdiffuseR::adjmat_to_edgelist(array_recovered, undirected = FALSE) test-adjmat.R:86:2
     2. netdiffuseR:::adjmat_to_edgelist.array(graph, undirected, keep.isolates)
     3. netdiffuseR:::adjmat_to_edgelist.matrix(...)
     4. netdiffuseR::nvertices(graph)
    
     ── 3. Error: Simple extraction throught clases (@test-egonets.R#44) ───────────
     EXPR must be a length 1 vector
     Backtrace:
     1. netdiffuseR::egonet_attrs(...) test-egonets.R:44:2
     2. netdiffuseR::nnodes(graph)
    
     ── 4. Error: as_dgCMatrix works (@test-misc.R#25) ─────────────────────────────
     'MARGIN' does not match dim(X)
     Backtrace:
     1. netdiffuseR::as_dgCMatrix(as.matrix(x)) test-misc.R:25:2
     2. netdiffuseR:::as_dgCMatrix.array(as.matrix(x))
     3. base::apply(x, 3, methods::as, Class = "dgCMatrix")
    
     ── 5. Error: Input (@test-rdiffnet.R#19) ──────────────────────────────────────
     'MARGIN' does not match dim(X)
     Backtrace:
     1. netdiffuseR::rdiffnet(...) test-rdiffnet.R:19:2
     2. netdiffuseR:::rdiffnet_check_seed_graph(...)
     3. base::apply(seed.graph, 3, function(x) methods::as(x, "dgCMatrix"))
    
     ── 6. Error: rewire_permute (@test-rewire.R#160) ──────────────────────────────
     Not an S4 object.
     Backtrace:
     1. netdiffuseR::permute_graph(as.matrix(g)) test-rewire.R:160:15
     2. base::lapply(x, permute_graph_cpp, self = self, multiple = multiple)
     3. netdiffuseR:::FUN(X[[i]], ...)
    
     ── 7. Error: rewire_qap (@test-rewire.R#197) ──────────────────────────────────
     EXPR must be a length 1 vector
     Backtrace:
     1. netdiffuseR::rewire_qap(as.matrix(g)) test-rewire.R:197:15
     4. netdiffuseR::nnodes(graph)
    
     ── 8. Error: Computation (@test-struct_equiv.R#11) ────────────────────────────
     EXPR must be a length 1 vector
     Backtrace:
     1. netdiffuseR::struct_equiv(graph) test-struct_equiv.R:11:2
    
     ── 9. Error: By group (@test-struct_equiv.R#77) ───────────────────────────────
     'MARGIN' does not match dim(X)
     Backtrace:
     1. netdiffuseR::exposure(diffnet, alt.graph = "se", valued = TRUE) test-struct_equiv.R:77:2
     6. netdiffuseR:::as_dgCMatrix.list(graph)
     7. base::lapply(x, as_dgCMatrix, make.dimnames = make.dimnames)
     9. netdiffuseR:::as_dgCMatrix.array(X[[i]], ...)
     10. base::apply(x, 3, methods::as, Class = "dgCMatrix")
    
     ══ DONE ════════════════════════════════════════════════════════════════════════
     Error: Test failures
     Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.20.2
Check: installed package size
Result: NOTE
     installed size is 11.6Mb
     sub-directories of 1Mb or more:
     doc 2.3Mb
     libs 7.6Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 1.20.2
Flags: --no-vignettes
Check: installed package size
Result: NOTE
     installed size is 6.2Mb
     sub-directories of 1Mb or more:
     doc 2.3Mb
     libs 2.3Mb
Flavors: r-devel-windows-ix86+x86_64, r-devel-windows-ix86+x86_64-gcc8, r-release-windows-ix86+x86_64, r-oldrel-windows-ix86+x86_64