Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rewire

Rewiring edges of a graph


Description

See the links below for the implemented rewiring methods.

Usage

rewire(graph, with)

Arguments

graph

The graph to rewire

with

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

Value

The rewired graph.

See Also

Other rewiring functions: each_edge(), keeping_degseq()

Examples

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)))

igraph

Network Analysis and Visualization

v1.2.10
GPL (>= 2)
Authors
See AUTHORS file.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.