build.subgraph: Build subgraph

View source: R/graph.utility.R

build.subgraphR 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");

marconotaro/HEMDAG documentation built on Nov. 20, 2024, 6:02 p.m.