The ggnet2 library allows to build network chart. Your data must be formatted in one of these formats. Then it will be transformed into a network object using the network library.

Adjacency Matrix. A square matrix, individuals in rows and columns are the same. Example: a correlation matrix

Incidence Matrix. Individuals in row and columns are not the same. Can be useful to check the releationship between one pop and another

Edge list. Edges are simply listed one by one.

Literal list. Connection are listed in a vector


A-B-C-D, E-A-E-A

1- Adjacency matrix

An adjacency matrix is a square matrix where individuals are the same in row and columns of the matrix. It’s typically the kind of matrix you get when calculating the correlation between each pair of individual. In this example, we have 1 connection from E to C, and 2 connections from C to E.


2- Incidence matrix

An incidence matrix does not necessarily have the same individuals in row and colum. By default, it is directed from rows to columns.

3- Edge List

The edge list is a data.frame listing all the connections.


Not what you are looking for ? Make a new search !


Leave a Reply

Notify of