Skip to contents

This is a collection of functions for extracting full, intra and inter subgraphs of a graph given a list of vertex subsets.

Usage

subgraph_full(g, vids)

subgraph_intra(g, vids)

subgraph_inter(g, vids)

Arguments

g

An igraph object.

vids

A list of integer vectors identifying vertex subsets.

Value

An igraph object storing a subgraph of type full, intra or inter.

Examples

g <- igraph::make_ring(10)
g_full  <- subgraph_full (g, list(1:3, 4:5, 8:10))
g_intra <- subgraph_intra(g, list(1:3, 4:5, 8:10))
g_inter <- subgraph_inter(g, list(1:3, 4:5, 8:10))