build.consistent.graph: Build consistent graph

Description Usage Arguments Details Value Examples

View source: R/graph.utility.R

Description

Build a graph in which all nodes are reachable from root.

Usage

1
build.consistent.graph(g = g, root = "00")

Arguments

g

an object of class graphNEL.

root

name of the class that is on the top-level of the hierarchy (def. root="00").

Details

All nodes not accessible from root (if any) are removed from the graph and printed on stdout.

Value

A graph (as an object of class graphNEL) in which all nodes are accessible from root.

Examples

1
2
3
4
5
data(graph);
root <- root.node(g);
G <- graph::addNode(c("X","Y","Z"), g);
G <- graph::addEdge(c("X","Y","Z"), c("HP:0011844","HP:0009810","HP:0012385"), G);
G <- build.consistent.graph(G, root=root);

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