random: random

View source: R/ROBIN_external_function.R

randomR Documentation

random

Description

This function randomly rewires the edges while preserving the original graph's degree distribution.

Usage

random(graph, dist = "NegBinom", verbose = FALSE)

Arguments

graph

The output of prepGraph.

dist

Option to rewire in a manner that retains overall graph weight regardless of distribution of edge weights. This option is invoked by putting any text into this field. Defaults to "NegBinom" for negative binomial.

verbose

flag for verbose output (default as FALSE)

Value

An igraph object, a randomly rewired graph.

Examples

my_file <- system.file("example/football.gml", package="robin")
graph <- prepGraph(file=my_file, file.format="gml")
graphRandom <- random(graph=graph)

robin documentation built on June 24, 2024, 5:11 p.m.