do.subgraph: Build subgraph

Description Usage Arguments Value Examples

View source: R/graph.utility.R

Description

This function returns a subgraph with only the supplied nodes and any edges between them.

Usage

1
do.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

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

gecko515/HEMDAG documentation built on Oct. 18, 2019, 6:34 a.m.