build.subgraph {HEMDAG}R Documentation

Build subgraph

Description

Build a subgraph with only the supplied nodes and any edges between them.

Usage

build.subgraph(nd, g, edgemode = "directed")

Arguments

nd

a vector with the nodes for which the subgraph must be built.

g

a graph of class graphNEL. It represents the hierarchy of the classes.

edgemode

can be "directed" or "undirected".

Value

A subgraph with only the supplied nodes.

Examples

data(graph);
anc <- build.ancestors(g);
nd <- anc[["HP:0001371"]];
subg <- build.subgraph(nd, g, edgemode="directed");

[Package HEMDAG version 2.7.4 Index]