5.1 Edge lists

suppressPackageStartupMessages(library(tidyverse))
suppressPackageStartupMessages(library(igraph))
  • The list of relationships underlying a network among it’s components is called edge lists.
  • An edge is defined by the pair of agents linked together. In other words, for each edge, two pieces of information are needed.
  • An edge list for a network can be defined by a table of two columns where the number of rows equal the number of edges.
  • In a directed graph, the nodes in first column are the sources of edges, and nodes in the second column receives the link.
  • In an undirected graph, order of columns doesn’t matter.
personA <- c("Mark", "Mark", "Peter", "Peter", "Bob", "Jill")
personB <- c("Peter", "Jill", "Bob", "Aaron", "Jill", "Aaron")

edgelist <- data.frame(PersonA = personA, PersonB = personB, stringsAsFactors = F)

print(edgelist)
##   PersonA PersonB
## 1    Mark   Peter
## 2    Mark    Jill
## 3   Peter     Bob
## 4   Peter   Aaron
## 5     Bob    Jill
## 6    Jill   Aaron

Pros:

  • Simple and intuitive. - Number of rows equal the number of edges.

Cons:

  • Impossible to represent isolates using an edge list since it details relations.6

  • Doesn’t support analysis methods.


  1. Pierre explained the meaning of “isolates” which are unlinked nodes.↩︎