Learn R Programming

dnet (version 1.0.0)

dDAGroot: Function to find the root node of a direct acyclic graph (DAG)

Description

dDAGroot is supposed to find the root node of a direct acyclic graph (DAG; an ontology). It return the name (i.e Term ID) of the root node.

Usage

dDAGroot(g)

Arguments

g
an object of class "igraph" or "graphNEL"

Value

    • root: the root name (i.e. Term ID)

See Also

dDAGroot

Examples

Run this code
# 1) load GO Molelular Function as igraph object
load(url("http://dnet.r-forge.r-project.org/data/Obo/ig.GOMF.RData"))
g <- ig.GOMF

# 2) find the root
root <- dDAGroot(g)

Run the code above in your browser using DataLab