Running ‘testthat.R’ [9s/13s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(sparsebn)
  Loading required package: sparsebnUtils
  Loading required package: ccdrAlgorithm
  Loading required package: discretecdAlgorithm
  
  sparsebn v0.1, Copyright (c) 2016-2020
  	Bryon Aragam, University of Chicago
  	Jiaying Gu, University of California, Los Angeles
  	Dacheng Zhang, University of California, Los Angeles
  	Qing Zhou, University of California, Los Angeles
  	Fei Fu
  
  Please cite our work! Type citation("sparsebn") for details.
  ---> Bugs? Please report any bugs at https://github.com/itsrainingdata/sparsebn/issues.
  
  > 
  > test_check("sparsebn")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  ● empty test (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-bwlist.R:60:5): Black lists work OK ─────────────────────────────
  Error: Input matrix must be square!
  Backtrace:
       █
    1. └─ccdrAlgorithm::ccdr.run(dat_cts, lambdas.length = nlambda, blacklist = blocks) test-bwlist.R:60:4
    2.   └─ccdrAlgorithm:::ccdr_call(...)
    3.     └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
    4.       ├─sparsebnUtils::edgeList(x)
    5.       └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
    6.         ├─sparsebnUtils::edgeList(el)
    7.         └─sparsebnUtils:::edgeList.matrix(el)
    8.           └─sparsebnUtils:::matrix_to_edgeList(x)
    9.             ├─sparsebnUtils::edgeList(as.sparse(x))
   10.             └─sparsebnUtils::as.sparse(x)
   11.               ├─sparsebnUtils::sparse(x, index = "R", ...)
   12.               └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   13.                 └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  ── Error (test-covariance.R:21:5): Covariance estimation correctly recovers the identity ──
  Error: Input matrix must be square!
  Backtrace:
       █
    1. └─sparsebn::estimate.covariance(dat) test-covariance.R:21:4
    2.   └─sparsebn::estimate.dag(data, ...)
    3.     └─ccdrAlgorithm::ccdr.run(...)
    4.       └─ccdrAlgorithm:::ccdr_call(...)
    5.         └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
    6.           ├─sparsebnUtils::edgeList(x)
    7.           └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
    8.             ├─sparsebnUtils::edgeList(el)
    9.             └─sparsebnUtils:::edgeList.matrix(el)
   10.               └─sparsebnUtils:::matrix_to_edgeList(x)
   11.                 ├─sparsebnUtils::edgeList(as.sparse(x))
   12.                 └─sparsebnUtils::as.sparse(x)
   13.                   ├─sparsebnUtils::sparse(x, index = "R", ...)
   14.                   └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   15.                     └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  ── Failure (test-covariance.R:26:5): Covariance estimation runs without errors ──
  `estimate.covariance(dat_cts)` threw an error.
  Message: Input matrix must be square!
  Class:   simpleError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(estimate.covariance(dat_cts), NA) test-covariance.R:26:4
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─sparsebn::estimate.covariance(dat_cts)
    7.   └─sparsebn::estimate.dag(data, ...)
    8.     └─ccdrAlgorithm::ccdr.run(...)
    9.       └─ccdrAlgorithm:::ccdr_call(...)
   10.         └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
   11.           ├─sparsebnUtils::edgeList(x)
   12.           └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
   13.             ├─sparsebnUtils::edgeList(el)
   14.             └─sparsebnUtils:::edgeList.matrix(el)
   15.               └─sparsebnUtils:::matrix_to_edgeList(x)
   16.                 ├─sparsebnUtils::edgeList(as.sparse(x))
   17.                 └─sparsebnUtils::as.sparse(x)
   18.                   ├─sparsebnUtils::sparse(x, index = "R", ...)
   19.                   └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   20.                     └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  ── Error (test-covariance.R:31:5): estimate.covariance returns expected output ──
  Error: Input matrix must be square!
  Backtrace:
       █
    1. └─sparsebn::estimate.covariance(dat_cts) test-covariance.R:31:4
    2.   └─sparsebn::estimate.dag(data, ...)
    3.     └─ccdrAlgorithm::ccdr.run(...)
    4.       └─ccdrAlgorithm:::ccdr_call(...)
    5.         └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
    6.           ├─sparsebnUtils::edgeList(x)
    7.           └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
    8.             ├─sparsebnUtils::edgeList(el)
    9.             └─sparsebnUtils:::edgeList.matrix(el)
   10.               └─sparsebnUtils:::matrix_to_edgeList(x)
   11.                 ├─sparsebnUtils::edgeList(as.sparse(x))
   12.                 └─sparsebnUtils::as.sparse(x)
   13.                   ├─sparsebnUtils::sparse(x, index = "R", ...)
   14.                   └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   15.                     └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  ── Failure (test-cytometry.R:7:5): Continuous cytometry data runs OK ───────────
  `out <- estimate.dag(dat)` threw an error.
  Message: Input matrix must be square!
  Class:   simpleError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(out <- estimate.dag(dat), NA) test-cytometry.R:7:4
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─sparsebn::estimate.dag(dat)
    7.   └─ccdrAlgorithm::ccdr.run(...)
    8.     └─ccdrAlgorithm:::ccdr_call(...)
    9.       └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
   10.         ├─sparsebnUtils::edgeList(x)
   11.         └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
   12.           ├─sparsebnUtils::edgeList(el)
   13.           └─sparsebnUtils:::edgeList.matrix(el)
   14.             └─sparsebnUtils:::matrix_to_edgeList(x)
   15.               ├─sparsebnUtils::edgeList(as.sparse(x))
   16.               └─sparsebnUtils::as.sparse(x)
   17.                 ├─sparsebnUtils::sparse(x, index = "R", ...)
   18.                 └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   19.                   └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  ── Failure (test-cytometry.R:8:5): Continuous cytometry data runs OK ───────────
  `estimate.parameters(out, dat)` threw an error.
  Message: object 'out' not found
  Class:   simpleError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(estimate.parameters(out, dat), NA) test-cytometry.R:8:4
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─sparsebnUtils::estimate.parameters(out, dat)
  ── Failure (test-cytometry.R:9:5): Continuous cytometry data runs OK ───────────
  `select.parameter(out, dat)` threw an error.
  Message: object 'out' not found
  Class:   simpleError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(select.parameter(out, dat), NA) test-cytometry.R:9:4
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─sparsebnUtils::select.parameter(out, dat)
   7.   ├─base::stopifnot(is.sparsebnPath(x))
   8.   └─sparsebnUtils::is.sparsebnPath(x)
  ── Failure (test-cytometry.R:16:5): Discrete cytometry data runs OK ────────────
  `out <- estimate.dag(dat)` threw an error.
  Message: Input matrix must be square!
  Class:   simpleError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(out <- estimate.dag(dat), NA) test-cytometry.R:16:4
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─sparsebn::estimate.dag(dat)
    7.   └─ccdrAlgorithm::ccdr.run(...)
    8.     └─ccdrAlgorithm:::ccdr_call(...)
    9.       └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
   10.         ├─sparsebnUtils::edgeList(x)
   11.         └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
   12.           ├─sparsebnUtils::edgeList(el)
   13.           └─sparsebnUtils:::edgeList.matrix(el)
   14.             └─sparsebnUtils:::matrix_to_edgeList(x)
   15.               ├─sparsebnUtils::edgeList(as.sparse(x))
   16.               └─sparsebnUtils::as.sparse(x)
   17.                 ├─sparsebnUtils::sparse(x, index = "R", ...)
   18.                 └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   19.                   └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  ── Failure (test-cytometry.R:17:5): Discrete cytometry data runs OK ────────────
  `estimate.parameters(out, dat)` threw an error.
  Message: object 'out' not found
  Class:   simpleError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(estimate.parameters(out, dat), NA) test-cytometry.R:17:4
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─sparsebnUtils::estimate.parameters(out, dat)
  ── Failure (test-cytometry.R:18:5): Discrete cytometry data runs OK ────────────
  `select.parameter(out, dat)` threw an error.
  Message: object 'out' not found
  Class:   simpleError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(select.parameter(out, dat), NA) test-cytometry.R:18:4
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─sparsebnUtils::select.parameter(out, dat)
   7.   ├─base::stopifnot(is.sparsebnPath(x))
   8.   └─sparsebnUtils::is.sparsebnPath(x)
  ── Failure (test-cytometry.R:25:5): Pathfinder data runs OK ────────────────────
  `out <- estimate.dag(dat)` threw an error.
  Message: Input matrix must be square!
  Class:   simpleError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(out <- estimate.dag(dat), NA) test-cytometry.R:25:4
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─sparsebn::estimate.dag(dat)
    7.   └─ccdrAlgorithm::ccdr.run(...)
    8.     └─ccdrAlgorithm:::ccdr_call(...)
    9.       └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
   10.         ├─sparsebnUtils::edgeList(x)
   11.         └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
   12.           ├─sparsebnUtils::edgeList(el)
   13.           └─sparsebnUtils:::edgeList.matrix(el)
   14.             └─sparsebnUtils:::matrix_to_edgeList(x)
   15.               ├─sparsebnUtils::edgeList(as.sparse(x))
   16.               └─sparsebnUtils::as.sparse(x)
   17.                 ├─sparsebnUtils::sparse(x, index = "R", ...)
   18.                 └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   19.                   └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  ── Failure (test-cytometry.R:26:5): Pathfinder data runs OK ────────────────────
  `estimate.parameters(out, dat)` threw an error.
  Message: object 'out' not found
  Class:   simpleError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(estimate.parameters(out, dat), NA) test-cytometry.R:26:4
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─sparsebnUtils::estimate.parameters(out, dat)
  ── Failure (test-cytometry.R:27:5): Pathfinder data runs OK ────────────────────
  `select.parameter(out, dat)` threw an error.
  Message: object 'out' not found
  Class:   simpleError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(select.parameter(out, dat), NA) test-cytometry.R:27:4
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─sparsebnUtils::select.parameter(out, dat)
   7.   ├─base::stopifnot(is.sparsebnPath(x))
   8.   └─sparsebnUtils::is.sparsebnPath(x)
  ── Failure (test-dag.R:25:5): DAG estimation runs without errors ───────────────
  `estimate.dag(dat_cts)` threw an error.
  Message: Input matrix must be square!
  Class:   simpleError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(estimate.dag(dat_cts), NA) test-dag.R:25:4
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─sparsebn::estimate.dag(dat_cts)
    7.   └─ccdrAlgorithm::ccdr.run(...)
    8.     └─ccdrAlgorithm:::ccdr_call(...)
    9.       └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
   10.         ├─sparsebnUtils::edgeList(x)
   11.         └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
   12.           ├─sparsebnUtils::edgeList(el)
   13.           └─sparsebnUtils:::edgeList.matrix(el)
   14.             └─sparsebnUtils:::matrix_to_edgeList(x)
   15.               ├─sparsebnUtils::edgeList(as.sparse(x))
   16.               └─sparsebnUtils::as.sparse(x)
   17.                 ├─sparsebnUtils::sparse(x, index = "R", ...)
   18.                 └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   19.                   └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  ── Failure (test-dag.R:31:5): DAG estimation runs without errors ───────────────
  `estimate.dag(dat_cts, blacklist = rbind(c(1, 2)))` threw an error.
  Message: Input matrix must be square!
  Class:   simpleError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(...) test-dag.R:31:4
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─sparsebn::estimate.dag(dat_cts, blacklist = rbind(c(1, 2)))
    7.   └─ccdrAlgorithm::ccdr.run(...)
    8.     └─ccdrAlgorithm:::ccdr_call(...)
    9.       └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
   10.         ├─sparsebnUtils::edgeList(x)
   11.         └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
   12.           ├─sparsebnUtils::edgeList(el)
   13.           └─sparsebnUtils:::edgeList.matrix(el)
   14.             └─sparsebnUtils:::matrix_to_edgeList(x)
   15.               ├─sparsebnUtils::edgeList(as.sparse(x))
   16.               └─sparsebnUtils::as.sparse(x)
   17.                 ├─sparsebnUtils::sparse(x, index = "R", ...)
   18.                 └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   19.                   └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  ── Error (test-dag.R:40:5): estimate.dag returns expected output: Continuous input ──
  Error: Input matrix must be square!
  Backtrace:
       █
    1. └─sparsebn::estimate.dag(dat_cts) test-dag.R:40:4
    2.   └─ccdrAlgorithm::ccdr.run(...)
    3.     └─ccdrAlgorithm:::ccdr_call(...)
    4.       └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
    5.         ├─sparsebnUtils::edgeList(x)
    6.         └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
    7.           ├─sparsebnUtils::edgeList(el)
    8.           └─sparsebnUtils:::edgeList.matrix(el)
    9.             └─sparsebnUtils:::matrix_to_edgeList(x)
   10.               ├─sparsebnUtils::edgeList(as.sparse(x))
   11.               └─sparsebnUtils::as.sparse(x)
   12.                 ├─sparsebnUtils::sparse(x, index = "R", ...)
   13.                 └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   14.                   └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  ── Error (test-precision.R:21:5): Precision estimation correctly recovers scalar matrix ──
  Error: Input matrix must be square!
  Backtrace:
       █
    1. └─sparsebn::estimate.precision(dat) test-precision.R:21:4
    2.   └─sparsebn::estimate.dag(data, ...)
    3.     └─ccdrAlgorithm::ccdr.run(...)
    4.       └─ccdrAlgorithm:::ccdr_call(...)
    5.         └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
    6.           ├─sparsebnUtils::edgeList(x)
    7.           └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
    8.             ├─sparsebnUtils::edgeList(el)
    9.             └─sparsebnUtils:::edgeList.matrix(el)
   10.               └─sparsebnUtils:::matrix_to_edgeList(x)
   11.                 ├─sparsebnUtils::edgeList(as.sparse(x))
   12.                 └─sparsebnUtils::as.sparse(x)
   13.                   ├─sparsebnUtils::sparse(x, index = "R", ...)
   14.                   └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   15.                     └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  ── Failure (test-precision.R:26:5): Precision estimation runs without errors ───
  `estimate.precision(dat_cts)` threw an error.
  Message: Input matrix must be square!
  Class:   simpleError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(estimate.precision(dat_cts), NA) test-precision.R:26:4
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─sparsebn::estimate.precision(dat_cts)
    7.   └─sparsebn::estimate.dag(data, ...)
    8.     └─ccdrAlgorithm::ccdr.run(...)
    9.       └─ccdrAlgorithm:::ccdr_call(...)
   10.         └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
   11.           ├─sparsebnUtils::edgeList(x)
   12.           └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
   13.             ├─sparsebnUtils::edgeList(el)
   14.             └─sparsebnUtils:::edgeList.matrix(el)
   15.               └─sparsebnUtils:::matrix_to_edgeList(x)
   16.                 ├─sparsebnUtils::edgeList(as.sparse(x))
   17.                 └─sparsebnUtils::as.sparse(x)
   18.                   ├─sparsebnUtils::sparse(x, index = "R", ...)
   19.                   └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   20.                     └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  ── Error (test-precision.R:31:5): estimate.precision returns expected output ───
  Error: Input matrix must be square!
  Backtrace:
       █
    1. └─sparsebn::estimate.precision(dat_cts) test-precision.R:31:4
    2.   └─sparsebn::estimate.dag(data, ...)
    3.     └─ccdrAlgorithm::ccdr.run(...)
    4.       └─ccdrAlgorithm:::ccdr_call(...)
    5.         └─sparsebnUtils::as.edgeList(fit[[k]]$edges)
    6.           ├─sparsebnUtils::edgeList(x)
    7.           └─ccdrAlgorithm:::edgeList.SparseBlockMatrixR(x)
    8.             ├─sparsebnUtils::edgeList(el)
    9.             └─sparsebnUtils:::edgeList.matrix(el)
   10.               └─sparsebnUtils:::matrix_to_edgeList(x)
   11.                 ├─sparsebnUtils::edgeList(as.sparse(x))
   12.                 └─sparsebnUtils::as.sparse(x)
   13.                   ├─sparsebnUtils::sparse(x, index = "R", ...)
   14.                   └─sparsebnUtils:::sparse.matrix(x, index = "R", ...)
   15.                     └─sparsebnUtils:::matrix_to_sparse(x, index = "R", ...)
  
  [ FAIL 19 | WARN 0 | SKIP 1 | PASS 31 ]
  Error: Test failures
  Execution halted