tests/testthat/test-DataInit.R

test_that("DataInit() returns a network object", {
  # Create a matrix object
  m <- matrix(c(0,1,1,0), nrow=2, ncol=2)

  # Call DataInit()
  n <- .DataInit(m)

  # Test that the output is a network object
  expect_true(is(n)[1] == "network")
})

Try the NetworkExtinction package in your browser

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

NetworkExtinction documentation built on March 31, 2023, 9:01 p.m.