# Undirected signed weighted example:
W <- matrix(c(
0, 0.4, -0.2,
0.4, 0, 0.1,
-0.2, 0.1, 0
), nrow = 3, byrow = TRUE)
colnames(W) <- rownames(W) <- c("A","B","C")
cent <- centrality(W)
cent$degree$OutDegree
cent$degree$OutExpectedInfluence
# Bridge centrality:
comm <- c(A = "X", B = "X", C = "Y")
cent_b <- centrality(W, communities = comm)
Run the code above in your browser using DataLab