tests/testthat/test-graphNEL.R

library(graph)
V = letters[1:12]
g2 = randomEGraph(V, edges=20)

test_that("proper class argument is provided", {
  expect_error(rSpectral::spectral_graphNEL(V), ".*graphNEL.*")
  expect_named(rSpectral::spectral_graphNEL(g2),c('names','membership'))
})

Try the rSpectral package in your browser

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

rSpectral documentation built on Jan. 22, 2023, 1:54 a.m.