R/graph_manipulate.R
graph_manipulate.Rd
functions to manipulate a graph
reorder_edges(g, attr, desc = TRUE)
igraph object
edge attribute name used to sort edges
logical. sort in descending (default) or ascending order
manipulated graph
reorder_edges() allows to reorder edges according to an attribute so that edges are drawn in the given order.
reorder_edges()
David Schoch
library(igraph) library(ggraph) g <- sample_gnp(10, 0.5) E(g)$attr <- 1:ecount(g) gn <- reorder_edges(g,"attr")