Network data is special

  • Must represent both nodes and edges
  • Two main ways of representing network data:
    1. Edge list (long format)
##   from to    weight
## 1    a  a 1.0000000
## 2    b  b 1.0000000
## 3    c  c 1.0000000
## 4    d  d 1.0000000
## 5    a  b 0.1680415
## 6    b  c 0.8075164
## 7    c  d 0.3849424
  1. Adjacency matrix (wide format)
## 4 x 4 sparse Matrix of class "dgCMatrix"
##   a b c d
## a . 1 . .
## b . . 1 .
## c . . . 1
## d . . . .