Learn R Programming

nevada (version 0.2.0)

subgraphs: Full, intra and inter subgraph generators

Description

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)

Value

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

Arguments

g

An igraph object.

vids

A list of integer vectors identifying vertex subsets.

Examples

Run this code
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))

Run the code above in your browser using DataLab