Learn R Programming

sparsebnUtils (version 0.0.8)

permute.nodes: Permute the order of nodes in a graph

Description

Randomize the order of the nodes in a graph.

Usage

permute.nodes(x, perm = NULL)

Arguments

x

Graph as edgeList object.

perm

Permutation to use.

Value

Permuted graph as edgeList object.

Details

Useful for obfuscating the topological sort in a DAG, which is often the default output of methods that generate a random DAG. Output is graph isomorphic to input.