Running ‘testthat.R’ [4s/5s]
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: .....12.....34
  Time of Adoption (toa_mat, toa_dif): ..........
  Isolated vertices (isolated, drop_isolated): ......5....6
  Bass Diffusion model: 7..
  Network bootstrap: ........
  Cumulative adopt count, and hazard rate: ....
  Degree function: .................
  Diffnet class and methods: ................8...
  Checking diffnet-indexing: 9.....a
  
  ══ Failed ══════════════════════════════════════════════════════════════════════
  ── 1. Failure: Undirected dynamic edgelist-adjmat-edgelist (should hold) - edgel
  `edgelist_recovered` not equivalent to as.matrix(EL_digraph[[g]]).
  Lengths differ: 12 is not 8
  
  ── 2. Failure: Undirected dynamic edgelist-adjmat-edgelist (should hold) - edgel
  `edgelist_recovered` not equivalent to as.matrix(EL_digraph[[g]]).
  Lengths differ: 12 is not 8
  
  ── 3. Failure: Undirected dynamic edgelist-adjmat-edgelist (should hold) - edgel
  `edgelist_recovered` not equivalent to as.matrix(EL_digraph[[g]]).
  Lengths differ: 12 is not 8
  
  ── 4. Failure: Undirected dynamic edgelist-adjmat-edgelist (should hold) - edgel
  `edgelist_recovered` not equivalent to as.matrix(EL_digraph[[g]]).
  Lengths differ: 12 is not 8
  
  ── 5. Error: Finding isolated nodes (@test-adjmat.R#197)  ──────────────────────
  Range of -toa- is bigger than the number of slices in -graph- (3 and 2 respectively). There must be at least as many slices as range of toa.
  1: new_diffnet(iso23, sample(1:3, 4, TRUE), t0 = 1, t1 = 3) at testthat/test-adjmat.R:197
  2: stop("Range of -toa- is bigger than the number of slices in -graph- (", ncol(mat[[1]]), 
         " and ", length(graph), " respectively). ", "There must be at least as many slices as range of toa.")
  
  ── 6. Error: Dropping isolated nodes (@test-adjmat.R#233)  ─────────────────────
  length of 'dimnames' [3] not equal to array extent
  1: array(unlist(lapply(iso2, as.matrix)), dim = c(4, 4, 3), dimnames = list(1:4, 1:4, 
         names(iso2))) at testthat/test-adjmat.R:233
  
  ── 7. Failure: bass fits the right thing (@test-bass.r#32)  ────────────────────
  unname(ans1) not equal to unname(ans0).
  1/2 mismatches
  [2] 0.223 - 0.222 == 0.00117
  
  ── 8. Error: Warnings and errors (@test-diffnet-class.R#180)  ──────────────────
  Range of -toa- is smaller than the number of slices in -graph- (3 and 5 respectively). Please provide lower and upper boundaries for the values in -toa- using -t0- and -t- (see ?toa_mat).
  1: expect_warning(with(g, new_diffnet(graph, as.numeric(toa))), "into integer") at testthat/test-diffnet-class.R:180
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: with(g, new_diffnet(graph, as.numeric(toa)))
  7: with.default(g, new_diffnet(graph, as.numeric(toa)))
  8: eval(substitute(expr), data, enclos = parent.frame())
  9: eval(substitute(expr), data, enclos = parent.frame())
  10: new_diffnet(graph, as.numeric(toa))
  11: stop("Range of -toa- is smaller than the number of slices in -graph- (", ncol(mat[[1]]), 
         " and ", length(graph), " respectively). ", "Please provide lower and upper boundaries for the values in -toa- ", 
         "using -t0- and -t- (see ?toa_mat).")
  
  ── 9. Error: Dynamic attributes assignment work (@test-diffnet-indexing.R#8)  ──
  No diffusion in this network (Ups!) try changing the seed or the parameters.
  1: rdiffnet(20, 5) at testthat/test-diffnet-indexing.R:8
  2: stop("No diffusion in this network (Ups!) try changing the seed or the parameters.")
  
  ── 10. Error: [<-.diffnet method (@test-diffnet-indexing.R#84)  ────────────────
  No diffusion in this network (Ups!) try changing the seed or the parameters.
  1: rdiffnet(20, 3) at testthat/test-diffnet-indexing.R:84
  2: stop("No diffusion in this network (Ups!) try changing the seed or the parameters.")
  
  Maximum number of 10 failures reached, some test results may be missing.
  
  ══ DONE ════════════════════════════════════════════════════════════════════════
  No-one gets it right on their first try
  Error: Test failures
  Execution halted