Running ‘testthat.R’ [11s/12s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(sparsebnUtils)
  > 
  > test_check("sparsebnUtils")
  1. Error: Conversion between edgeList <-> graphNEL/igraph/network <-> matrix works (@test-as.R#39) 
  there is no package called 'igraph'
  1: expect_equivalent(edgeL0, as.edgeList(igraph::graph.adjacency(mat0, weighted = TRUE))) at testthat/test-as.R:39
  2: compare(object, expected, check.attributes = FALSE)
  3: compare.default(object, expected, check.attributes = FALSE)
  4: all.equal(x, y, ...)
  5: all.equal.list(x, y, ...)
  6: as.edgeList(igraph::graph.adjacency(mat0, weighted = TRUE))
  7: edgeList(x)
  8: igraph::graph.adjacency
  9: getExportedValue(pkg, name)
  10: asNamespace(ns)
  11: getNamespace(ns)
  12: tryCatch(loadNamespace(name), error = function(e) stop(e))
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  15: value[[3L]](cond)
  
  2. Error: Coercion works on empty graphs (@test-compatibility.R#16) ------------
  igraph package required to coerce data to 'igraph' type!
  1: expect_equivalent(sbf.empty, to_edgeList(to_igraph(sbf.empty))) at testthat/test-compatibility.R:16
  2: compare(object, expected, check.attributes = FALSE)
  3: compare.default(object, expected, check.attributes = FALSE)
  4: all.equal(x, y, ...)
  5: all.equal.default(x, y, ...)
  6: to_edgeList(to_igraph(sbf.empty))
  7: to_igraph(sbf.empty)
  8: stop("igraph package required to coerce data to 'igraph' type!", call. = FALSE)
  
  3. Error: Coercion to igraph works (@test-compatibility.R#43) ------------------
  igraph package required to coerce data to 'igraph' type!
  1: expect_is(to_igraph(sbf)$edges, "igraph") at testthat/test-compatibility.R:43
  2: klass(object)
  3: paste(class(x), collapse = "/")
  4: to_igraph(sbf)
  5: stop("igraph package required to coerce data to 'igraph' type!", call. = FALSE)
  
  4. Error: Iterative coercing works (@test-compatibility.R#86) ------------------
  igraph package required to coerce data to 'igraph' type!
  1: expect_equivalent(sbf.empty, to_edgeList(to_graphNEL(to_network(to_igraph(sbf.empty))))) at testthat/test-compatibility.R:86
  2: compare(object, expected, check.attributes = FALSE)
  3: compare.default(object, expected, check.attributes = FALSE)
  4: all.equal(x, y, ...)
  5: all.equal.default(x, y, ...)
  6: to_edgeList(to_graphNEL(to_network(to_igraph(sbf.empty))))
  7: to_graphNEL(to_network(to_igraph(sbf.empty)))
  8: to_network(to_igraph(sbf.empty))
  9: to_igraph(sbf.empty)
  10: stop("igraph package required to coerce data to 'igraph' type!", call. = FALSE)
  
  5. Error: Permuting nodes results in isomorphic output (@test-edgeList.R#20) ---
  there is no package called 'igraph'
  1: expect_true(igraph::isomorphic(to_igraph(gr), to_igraph(permute.nodes(gr)))) at testthat/test-edgeList.R:20
  2: expect(identical(as.vector(object), TRUE), sprintf("%s isn't true.", lab), info = info)
  3: as.expectation(exp, ..., srcref = srcref)
  4: identical(as.vector(object), TRUE)
  5: as.vector(object)
  6: igraph::isomorphic
  7: getExportedValue(pkg, name)
  8: asNamespace(ns)
  9: getNamespace(ns)
  10: tryCatch(loadNamespace(name), error = function(e) stop(e))
  11: tryCatchList(expr, classes, parentenv, handlers)
  12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  13: value[[3L]](cond)
  
  6. Error: random.dag always produces a DAG (@test-random_dag.R#33) -------------
  there is no package called 'igraph'
  1: expect_warning(igraph::topo_sort(igraph::graph.adjacency(m)), NA) at testthat/test-random_dag.R:33
  2: capture_warnings(object)
  3: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  4: igraph::topo_sort
  5: getExportedValue(pkg, name)
  6: asNamespace(ns)
  7: getNamespace(ns)
  8: tryCatch(loadNamespace(name), error = function(e) stop(e))
  9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: value[[3L]](cond)
  
  7. Failure: Switching without coercion works (@test-setGraphPackage.R#14) ------
  setGraphPackage("igraph") threw an error.
  The igraph package is required in order to use this method. Please install it first.
  
  
  8. Failure: Switching without coercion works (@test-setGraphPackage.R#15) ------
  options()$sparsebn.graph not equal to "igraph".
  1/1 mismatches
  x[1]: "graph"
  y[1]: "igraph"
  
  
  testthat results ================================================================
  OK: 268 SKIPPED: 0 FAILED: 8
  1. Error: Conversion between edgeList <-> graphNEL/igraph/network <-> matrix works (@test-as.R#39) 
  2. Error: Coercion works on empty graphs (@test-compatibility.R#16) 
  3. Error: Coercion to igraph works (@test-compatibility.R#43) 
  4. Error: Iterative coercing works (@test-compatibility.R#86) 
  5. Error: Permuting nodes results in isomorphic output (@test-edgeList.R#20) 
  6. Error: random.dag always produces a DAG (@test-random_dag.R#33) 
  7. Failure: Switching without coercion works (@test-setGraphPackage.R#14) 
  8. Failure: Switching without coercion works (@test-setGraphPackage.R#15) 
  
  Error: testthat unit tests failed
  Execution halted