to_subgraph: Map a graph onto an induced subgraph

to_subgraphR Documentation

Map a graph onto an induced subgraph

Description

Map a graph onto an induced subgraph

Usage

to_subgraph(graph, ord, vnames)

Arguments

graph

an object of class mixedgraph

ord

an ordering to use for the existing vertices

vnames

a character vector of variable names

Details

Either ord or vnames must be specified, and if they are both given then they must have the same length. vnames must contain all the variable names used in graph.

ord places the vertices in the order provided. For example, if the supplied vector is c(2, 4, 1, 3) for a graph with vertices "x1" and "x2", then the output graph will have the vertex order ⁠"x2", "x_4", "x_1", "x_3"⁠.


rje42/MixedGraphs documentation built on March 20, 2024, 8:09 a.m.