tests/testthat/test-graph_manipulate.R

test_that("reorder_edges works", {
   g <- igraph::make_full_graph(3)
   igraph::E(g)$weight <- c(1,2,3)
   g1 <- graphlayouts::reorder_edges(g,"weight")
   expect_equal(igraph::E(g)$weight,rev(igraph::E(g1)$weight))
})

Try the graphlayouts package in your browser

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

graphlayouts documentation built on Nov. 4, 2023, 1:08 a.m.