Running ‘testthat.R’ [33s/39s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(bnclassify)
  > 
  > test_check("bnclassify")
  ── 1. Failure: Fast structure fitting with smooth (@test-cv.R#56)  ─────────────
  `r` not equal to c(0.8582183, 0.7002446).
  2/2 mismatches (average diff: 0.00346)
  [1] 0.851 - 0.858 == -6.92e-03
  [2] 0.700 - 0.700 == -4.68e-06
  
  ── 2. Failure: distribute accross folds nominal (@test-cv.R#166)  ──────────────
  all(table(f) == c(403, 404, 403)) isn't true.
  
  ── 3. Failure: distribute accross folds nominal (@test-cv.R#173)  ──────────────
  `f` not equal to c(733, 485, 899, 857).
  4/4 mismatches (average diff: 530)
  [1]   63 - 733 == -670
  [2] 1113 - 485 ==  628
  [3]  120 - 899 == -779
  [4]  898 - 857 ==   41
  
  ── 4. Failure: Contingency table to CPT (@test-data-statistics.R#58)  ──────────
  tcpt[, 1] not equal to setNames(c(1, 3, 4)/8, letters[1:3]).
  3/3 mismatches (average diff: 0.167)
  [1] 0.333 - 0.125 ==  0.2083
  [2] 0.417 - 0.375 ==  0.0417
  [3] 0.250 - 0.500 == -0.2500
  
  ── 5. Failure: Contingency table to CPT (@test-data-statistics.R#64)  ──────────
  tcpt[, 1] not equal to setNames(c(0, 2, 3)/5, letters[1:3]).
  3/3 mismatches (average diff: 0.252)
  [1] 0.333 - 0.0 ==  0.3333
  [2] 0.444 - 0.4 ==  0.0444
  [3] 0.222 - 0.6 == -0.3778
  
  -1.54485 -1.50696 -1.31785 -1.2128 -1.4612 -1.20742 -1.26966 -1.67055 -0.440312 -1.11241 -4.29046 -4.29046 -0.545227 -0.93827 -4.23411 -4.23411
  ── 6. Failure: one tree (@test-learn-params-awnb.R#7)  ─────────────────────────
  as.vector(a["doors"]) not equal to 0.3779645.
  1/1 mismatches
  [1] 0.408 - 0.378 == 0.0303
  
  ── 7. Failure: one two trees (@test-learn-params-awnb.R#17)  ───────────────────
  as.vector(a["persons"]) not equal to 1.
  1/1 mismatches
  [1] 0.854 - 1 == -0.146
  
  ── 8. Failure: one two trees (@test-learn-params-awnb.R#21)  ───────────────────
  as.vector(a["superfund_right_to_sue"]) not equal to 0.2101914.
  1/1 mismatches
  [1] 0.208 - 0.21 == -0.00246
  
  ── 9. Failure: one two trees (@test-learn-params-awnb.R#22)  ───────────────────
  as.vector(a["mx_missile"]) not equal to 0.3048748.
  1/1 mismatches
  [1] 0.289 - 0.305 == -0.0162
  
  ── 10. Failure: one two trees (@test-learn-params-awnb.R#23)  ──────────────────
  as.vector(a["immigration"]) not equal to 0.3996341.
  1/1 mismatches
  [1] 0.335 - 0.4 == -0.0649
  
  ── 11. Failure: memoise char nominal (@test-memoise.R#10)  ─────────────────────
  `\{ \.\.\. \}` does not match "x".
  Actual value: "\[1\] "n""
  
  ── 12. Failure: memoise char nominal (@test-memoise.R#13)  ─────────────────────
  `\{ \.\.\. \}` does not match "x".
  Actual value: "\[1\] "n""
  
  ── 13. Failure: forget nominal (@test-memoise.R#25)  ───────────────────────────
  `\{ \.\.\. \}` does not match "x".
  Actual value: "\[1\] "n""
  
  ── 14. Failure: forget nominal (@test-memoise.R#27)  ───────────────────────────
  `\{ \.\.\. \}` does not match "g".
  Actual value: "\[1\] "y""
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 612 SKIPPED: 27 FAILED: 14
  1. Failure: Fast structure fitting with smooth (@test-cv.R#56) 
  2. Failure: distribute accross folds nominal (@test-cv.R#166) 
  3. Failure: distribute accross folds nominal (@test-cv.R#173) 
  4. Failure: Contingency table to CPT (@test-data-statistics.R#58) 
  5. Failure: Contingency table to CPT (@test-data-statistics.R#64) 
  6. Failure: one tree (@test-learn-params-awnb.R#7) 
  7. Failure: one two trees (@test-learn-params-awnb.R#17) 
  8. Failure: one two trees (@test-learn-params-awnb.R#21) 
  9. Failure: one two trees (@test-learn-params-awnb.R#22) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted