Learn R Programming

dnet (version 1.0.0)

dDAGreverse: Function to reverse the edge direction of a direct acyclic graph (DAG)

Description

dDAGreverse is supposed to reverse the edge direction of a direct acyclic graph (DAG; an ontology). The return graph remains all attributes associated on nodes and edges.

Usage

dDAGreverse(g)

Arguments

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

Value

    • gr: a graph being reversed, an object of class "igraph" or "graphNEL"

See Also

dDAGreverse

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) the graph with reverse edge direction
gr <- dDAGreverse(g)

Run the code above in your browser using DataLab