Directed networks

Network Analysis in R

James Curley

Associate Professor, University of Texas at Austin

Directionality

Network Analysis in R

Examining the igraph object

Undirected:

    IGRAPH UN-- 7 7 -- 
    + attr: name (v/c)
    + edges (vertex names):
    [1] A--B A--C A--D A--E A--F E--F F--G

Directed:

    IGRAPH DN-- 7 7 -- 
    + attr: name (v/c)
    + edges (vertex names):
    [1] A->E B->A C->A D->A F->A F->E F->G
Network Analysis in R

Checking igraph objects

is.directed(g)
[1] TRUE
is.weighted(g)
[1] FALSE
Network Analysis in R

In-degree and out-degree

Network Analysis in R

Is there an edge between A & E?

g['A','E']
[1] 1

Show all edges to or from A:

incident(g,'A', mode=c("all"))
+ 5/7 edges (vertex names):
[1] A->E B->A C->A D->A F->A

Find the starting vertex of all edges:

head_of(g, E(g))
+ 7/7 vertices, named:
[1] A B C D F F F

Network Analysis in R

Let's practice!

Network Analysis in R

Preparing Video For Download...