Learn R Programming

BiDAG (version 2.1.4)

getSubGraph: Deriving subgraph

Description

This function derives an adjacency matrix of a subgraph based on the adjacency matrix of a full graph and a list of nodes

Usage

getSubGraph(adj, nodes)

Value

adjacency matrix of a subgraph which includes all 'nodes'

Arguments

adj

square adjacency matrix with elements in {0,1}, representing a graph

nodes

vector of node names of the subgraph; should be a subset of column names of 'adj'

Examples

Run this code
getSubGraph(Asiamat,c("E","B","D","X"))

Run the code above in your browser using DataLab