tests/testthat/test-anb-internal.R

context("anb internal") 

test_that("nb_dag", {
  # Nominal
  d <- nb_dag('f', letters[1:5])
  expect_equal(graph_num_arcs(d), 5)
  expect_equal(d$edgemode, "directed")
  # No features
  d <- nb_dag('f', NULL)
  expect_equal(graph_num_arcs(d), 0)
  expect_equal(graph_num_nodes(d), 1) 
  expect_equal(d$edgemode, "directed")
})

Try the bnclassify package in your browser

Any scripts or data that you put into this service are public.

bnclassify documentation built on Nov. 16, 2022, 5:08 p.m.