W <- matrix(c(
0, 0.4, -0.2, 0,
0.4, 0, 0.1, 0.3,
-0.2, 0.1, 0, 0.2,
0, 0.3, 0.2, 0
), nrow = 4, byrow = TRUE)
colnames(W) <- rownames(W) <- c("A", "B", "C", "D")
cent <- centrality(W)
# Plot degree + EI
# pdf('radar_plot.pdf')
centrality_radar(cent, measures = c("outdegree", "outEI"),
axis_range = c(0, 1), plwd = 2,
seg = 5, caxislabel = seq(0,1,0.2))
# dev.off()
# If bridge metrics were computed:
comm <- c(A="X", B="X", C="Y", D="Y")
cent_b <- centrality(W, communities = comm)
centrality_radar(cent_b, measures = c("bridgestrength", "bridgebetweenness"))
Run the code above in your browser using DataLab