Running ‘testthat.R’ [17s/25s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(bnclassify)
  > 
  > test_check("bnclassify")
  -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
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  ● Local rdata file (1)
  ● On CRAN (17)
  ● empty test (16)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-anb-bn.R:33:3): Just the class in dataset ───────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::bnc_dag(tbdag, class = "class") test-anb-bn.R:33:2
   2.   └─bnclassify:::graphNEL2families(dag, class)
   3.     └─bnclassify:::graphNEL_parents(dag)
   4.       └─bnclassify:::graph_parents(g)
   5.         └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-anb-dag.R:16:3): bnc_dag ────────────────────────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::bnc_dag(dag = g, class = "A") test-anb-dag.R:16:2
   2.   └─bnclassify:::graphNEL2families(dag, class)
   3.     └─bnclassify:::graphNEL_parents(dag)
   4.       └─bnclassify:::graph_parents(g)
   5.         └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-anb-families.R:131:3): Find ancestors ───────────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::nbcarclass() test-anb-families.R:131:2
   2.   ├─bnclassify::lp(...) helper-common.R:27:2
   3.   │ └─bnclassify:::lp_implement(...)
   4.   └─bnclassify::nb("class", car[, "class", drop = FALSE])
   5.     └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   6.       └─bnclassify:::graphNEL2families(dag, class)
   7.         └─bnclassify:::graphNEL_parents(dag)
   8.           └─bnclassify:::graph_parents(g)
   9.             └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-anb-families.R:137:3): Find ancestors not in graph ──────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::nbcarclass() test-anb-families.R:137:2
   2.   ├─bnclassify::lp(...) helper-common.R:27:2
   3.   │ └─bnclassify:::lp_implement(...)
   4.   └─bnclassify::nb("class", car[, "class", drop = FALSE])
   5.     └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   6.       └─bnclassify:::graphNEL2families(dag, class)
   7.         └─bnclassify:::graphNEL_parents(dag)
   8.           └─bnclassify:::graph_parents(g)
   9.             └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-bnc-dag-operate.R:19:3): not cci no features ────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::nbcarclass() test-bnc-dag-operate.R:19:2
   2.   ├─bnclassify::lp(...) helper-common.R:27:2
   3.   │ └─bnclassify:::lp_implement(...)
   4.   └─bnclassify::nb("class", car[, "class", drop = FALSE])
   5.     └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   6.       └─bnclassify:::graphNEL2families(dag, class)
   7.         └─bnclassify:::graphNEL_parents(dag)
   8.           └─bnclassify:::graph_parents(g)
   9.             └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-bnc-dag-operate.R:40:3): is supernode class var ─────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::nbcarclass() test-bnc-dag-operate.R:40:2
   2.   ├─bnclassify::lp(...) helper-common.R:27:2
   3.   │ └─bnclassify:::lp_implement(...)
   4.   └─bnclassify::nb("class", car[, "class", drop = FALSE])
   5.     └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   6.       └─bnclassify:::graphNEL2families(dag, class)
   7.         └─bnclassify:::graphNEL_parents(dag)
   8.           └─bnclassify:::graph_parents(g)
   9.             └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-bnc-dag-operate.R:45:3): is_semi_naive just class ───────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::nbcarclass() test-bnc-dag-operate.R:45:2
   2.   ├─bnclassify::lp(...) helper-common.R:27:2
   3.   │ └─bnclassify:::lp_implement(...)
   4.   └─bnclassify::nb("class", car[, "class", drop = FALSE])
   5.     └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   6.       └─bnclassify:::graphNEL2families(dag, class)
   7.         └─bnclassify:::graphNEL_parents(dag)
   8.           └─bnclassify:::graph_parents(g)
   9.             └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-bnc-dag-operate.R:55:3): include node nominal ───────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::nbcarclass() test-bnc-dag-operate.R:55:2
   2.   ├─bnclassify::lp(...) helper-common.R:27:2
   3.   │ └─bnclassify:::lp_implement(...)
   4.   └─bnclassify::nb("class", car[, "class", drop = FALSE])
   5.     └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   6.       └─bnclassify:::graphNEL2families(dag, class)
   7.         └─bnclassify:::graphNEL_parents(dag)
   8.           └─bnclassify:::graph_parents(g)
   9.             └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-bnc-dag-operate.R:63:3): include node multiple nodes ────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::nbcarclass() test-bnc-dag-operate.R:63:2
   2.   ├─bnclassify::lp(...) helper-common.R:27:2
   3.   │ └─bnclassify:::lp_implement(...)
   4.   └─bnclassify::nb("class", car[, "class", drop = FALSE])
   5.     └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   6.       └─bnclassify:::graphNEL2families(dag, class)
   7.         └─bnclassify:::graphNEL_parents(dag)
   8.           └─bnclassify:::graph_parents(g)
   9.             └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-bnc-dag-operate.R:79:3): remove feature not in graph ────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::nbcarclass() test-bnc-dag-operate.R:79:2
   2.   ├─bnclassify::lp(...) helper-common.R:27:2
   3.   │ └─bnclassify:::lp_implement(...)
   4.   └─bnclassify::nb("class", car[, "class", drop = FALSE])
   5.     └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   6.       └─bnclassify:::graphNEL2families(dag, class)
   7.         └─bnclassify:::graphNEL_parents(dag)
   8.           └─bnclassify:::graph_parents(g)
   9.             └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-bnc-dag-operate.R:90:3): feature orphans no features ────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::nbcarclass() test-bnc-dag-operate.R:90:2
   2.   ├─bnclassify::lp(...) helper-common.R:27:2
   3.   │ └─bnclassify:::lp_implement(...)
   4.   └─bnclassify::nb("class", car[, "class", drop = FALSE])
   5.     └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   6.       └─bnclassify:::graphNEL2families(dag, class)
   7.         └─bnclassify:::graphNEL_parents(dag)
   8.           └─bnclassify:::graph_parents(g)
   9.             └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-cv.R:53:3): Fast structure fitting with smooth ──────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. ├─bnclassify::lp(nb("class", car[, 7, drop = FALSE]), car, smooth = 1) test-cv.R:53:2
   2. │ └─bnclassify:::lp_implement(...)
   3. └─bnclassify::nb("class", car[, 7, drop = FALSE])
   4.   └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   5.     └─bnclassify:::graphNEL2families(dag, class)
   6.       └─bnclassify:::graphNEL_parents(dag)
   7.         └─bnclassify:::graph_parents(g)
   8.           └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-hc-bsej.R:15:3): Merge supernodes ───────────────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::nbcarclass() test-hc-bsej.R:15:2
   2.   ├─bnclassify::lp(...) helper-common.R:27:2
   3.   │ └─bnclassify:::lp_implement(...)
   4.   └─bnclassify::nb("class", car[, "class", drop = FALSE])
   5.     └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   6.       └─bnclassify:::graphNEL2families(dag, class)
   7.         └─bnclassify:::graphNEL_parents(dag)
   8.           └─bnclassify:::graph_parents(g)
   9.             └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-hc-bsej.R:36:3): Excludes ───────────────────────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::excludes(nb) test-hc-bsej.R:36:2
   2.   └─base::lapply(features(bnc_dag), remove_feature, bnc_dag)
   3.     └─bnclassify:::FUN(X[[i]], ...)
   4.       └─bnclassify:::bnc_dag(g, class_var(x))
   5.         └─bnclassify:::graphNEL2families(dag, class)
   6.           └─bnclassify:::graphNEL_parents(dag)
   7.             └─bnclassify:::graph_parents(g)
   8.               └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-hc-fssj.R:29:3): includes ───────────────────────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify::nb("Class") test-hc-fssj.R:29:2
   2.   └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   3.     └─bnclassify:::graphNEL2families(dag, class)
   4.       └─bnclassify:::graphNEL_parents(dag)
   5.         └─bnclassify:::graph_parents(g)
   6.           └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-hc-fssj.R:43:3): augment supernodes ─────────────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify::nb("class", NULL) test-hc-fssj.R:43:2
   2.   └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   3.     └─bnclassify:::graphNEL2families(dag, class)
   4.       └─bnclassify:::graphNEL_parents(dag)
   5.         └─bnclassify:::graph_parents(g)
   6.           └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-hc-ode.R:71:3): augment arcs no features ────────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::nbcarclass() test-hc-ode.R:71:2
   2.   ├─bnclassify::lp(...) helper-common.R:27:2
   3.   │ └─bnclassify:::lp_implement(...)
   4.   └─bnclassify::nb("class", car[, "class", drop = FALSE])
   5.     └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   6.       └─bnclassify:::graphNEL2families(dag, class)
   7.         └─bnclassify:::graphNEL_parents(dag)
   8.           └─bnclassify:::graph_parents(g)
   9.             └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-infer-anb-cpp.R:22:3): No features ──────────────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::bnc_dag(nb_dag("class", NULL), "class") test-infer-anb-cpp.R:22:2
   2.   └─bnclassify:::graphNEL2families(dag, class)
   3.     └─bnclassify:::graphNEL_parents(dag)
   4.       └─bnclassify:::graph_parents(g)
   5.         └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-infer-anb.R:28:3): No features ──────────────────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::bnc_dag(nb_dag("class", NULL), "class") test-infer-anb.R:28:2
   2.   └─bnclassify:::graphNEL2families(dag, class)
   3.     └─bnclassify:::graphNEL_parents(dag)
   4.       └─bnclassify:::graph_parents(g)
   5.         └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-infer.R:27:3): Just the class with incomplete data set ──────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. ├─bnclassify::lp(...) test-infer.R:27:2
   2. │ └─bnclassify:::lp_implement(...)
   3. └─bnclassify::nb("Class", voting[, 17, drop = FALSE])
   4.   └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   5.     └─bnclassify:::graphNEL2families(dag, class)
   6.       └─bnclassify:::graphNEL_parents(dag)
   7.         └─bnclassify:::graph_parents(g)
   8.           └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-learn-chowliu.R:21:3): chowliu No features ──────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::chowliu(...) test-learn-chowliu.R:21:2
   2.   └─bnclassify:::bnc_dag(dag = ode, class = class)
   3.     └─bnclassify:::graphNEL2families(dag, class)
   4.       └─bnclassify:::graphNEL_parents(dag)
   5.         └─bnclassify:::graph_parents(g)
   6.           └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-learn-params-manb.R:15:3): compute manb no features ─────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify:::nbcarclass() test-learn-params-manb.R:15:2
   2.   ├─bnclassify::lp(...) helper-common.R:27:2
   3.   │ └─bnclassify:::lp_implement(...)
   4.   └─bnclassify::nb("class", car[, "class", drop = FALSE])
   5.     └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   6.       └─bnclassify:::graphNEL2families(dag, class)
   7.         └─bnclassify:::graphNEL_parents(dag)
   8.           └─bnclassify:::graph_parents(g)
   9.             └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  ── Error (test-learn-struct.R:14:3): nb No features  ───────────────────────────
  Error: 'names' attribute [1] must be the same length as the vector [0]
  Backtrace:
      █
   1. └─bnclassify::nb("class", car[, 7, drop = FALSE]) test-learn-struct.R:14:2
   2.   └─bnclassify:::bnc_dag(nb_dag(class, features), class)
   3.     └─bnclassify:::graphNEL2families(dag, class)
   4.       └─bnclassify:::graphNEL_parents(dag)
   5.         └─bnclassify:::graph_parents(g)
   6.           └─stats::setNames(replicate(nnodes, character()), graph_nodes(g))
  
  [ FAIL 23 | WARN 0 | SKIP 34 | PASS 555 ]
  Error: Test failures
  Execution halted