build.subgraph: Build subgraph

Description Usage Arguments Value Examples

View source: R/graph.utility.R

Description

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

Usage

1
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

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

HEMDAG documentation built on Feb. 12, 2021, 5:13 p.m.