tests/testthat/test-defineNetwork.R

test_that("Output type", {
  A <- matrix(rbinom(100,1,.2),10,10)
  type <- "simple"
  netA <- defineSBM(A,"poisson",type,directed=TRUE,dimLabels=c("Actor"))
  expect_equal(netA$dimLabels[[1]],"Actor")
  expect_true(is_SBM(netA))
})

Try the sbm package in your browser

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

sbm documentation built on Jan. 9, 2023, 5:12 p.m.