Learn R Programming

igraph (version 1.3.5)

rewire: Rewiring edges of a graph

Description

See the links below for the implemented rewiring methods.

Usage

rewire(graph, with)

Value

The rewired graph.

Arguments

graph

The graph to rewire

with

A function call to one of the rewiring methods, see details below.

See Also

Other rewiring functions: each_edge(), keeping_degseq()

Examples

Run this code
g <- make_ring(10)
g %>%
  rewire(each_edge(p = .1, loops = FALSE)) %>%
  plot(layout=layout_in_circle)
print_all(rewire(g, with = keeping_degseq(niter = vcount(g) * 10)))

Run the code above in your browser using DataLab