Running ‘testthat.R’ [26s/36s]
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