Session Ready
Exercise

The adjacency matrix (part 2)

The adjacency matrix encodes the structure of the network, that is nodes and ties. It can be manipulated with matrix algebra operations to obtain useful insights about the network, including centrality measures.

In this exercise, we use the adjacency matrix to compute, once again, the node degrees and node strengths. The weighted adjacency matrix A is loaded in the workspace.

Instructions
100 XP
  • Obtain a vector of node strengths using the weighted adjacency matrix A by using rowSums().
  • Build a logical adjacency matrix B from the weighted matrix A: entries in B should be TRUE whenever entries in A are greater than zero.
  • Again, using rowSums(), obtain a vector of node degrees using the Boolean matrix B.