dDAGreverse: Function to reverse the edge direction of a direct acyclic...

Description Usage Arguments Value Note See Also Examples

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

1

Arguments

g

an object of class "igraph" or "graphNEL"

Value

Note

none

See Also

dDAGreverse

Examples

1
2
3
4
5
6
7
# 1) load HPPA as igraph object
ig.HPPA <-dRDataLoader(RData='ig.HPPA')
g <- ig.HPPA

# 2) the graph with reverse edge direction
gr <- dDAGreverse(g)
gr

Example output

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: supraHex
Loading required package: hexbin
'ig.HPPA' (from package 'dnet' version 1.1.4) has been loaded into the working environment (at 2019-05-21 19:52:08)
IGRAPH 11c70a9 DN-- 11389 15221 -- 
+ attr: name (v/c), term_id (v/c), term_name (v/c), term_distance
| (v/n), relation (e/c)
+ edges from 11c70a9 (vertex names):
 [1] HP:0000098->HP:0000002 HP:0004322->HP:0000002 HP:0012772->HP:0000002
 [4] HP:0000130->HP:0000008 HP:0000137->HP:0000008 HP:0000140->HP:0000008
 [7] HP:0000142->HP:0000008 HP:0011027->HP:0000008 HP:0000011->HP:0000009
[10] HP:0000012->HP:0000009 HP:0000016->HP:0000009 HP:0000017->HP:0000009
[13] HP:0000019->HP:0000009 HP:0000020->HP:0000009 HP:0000076->HP:0000009
[16] HP:0000805->HP:0000009 HP:0002839->HP:0000009 HP:0005340->HP:0000009
[19] HP:0100515->HP:0000009 HP:0100518->HP:0000009 HP:0012786->HP:0000010
+ ... omitted several edges

dnet documentation built on Feb. 20, 2020, 5:08 p.m.

Related to dDAGreverse in dnet...