Share the Gallery !Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

To build a network chart, your data must be formatted in one of these formats:

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. By default, we get an unweighted and oriented network.

Note that you can ask for weighted or unweighted network, and directed or undirected network. Following your choice, you need to specify how you want to interpret the adjency matrix: e.g. how to calculate the weight? Using the sum of the connection? The max? .. Type help(graph_from_adjacency_matrix) for more details.

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.

You can add a second data frame which provides some features concerning each nodes. This kind of additional data can be useful to custom the network. Here the size of nodes depends of the “carac” column value. Note that you can make the chart directed or undirected.

4- Literal List of connections


 

 

The last option is to provide a vector with all the connections listed.

Type help(graph_from_literal) for more information.

 

 


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

[mediatagger]


Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz