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 Feb. 21, 2026, 9:06 a.m.