components_id | R Documentation |
This function assigns an id to the components that each of the nodes of the matrix belongs
components_id(A)
A |
A matrix |
A vector assigning an id the components that each of the nodes of the matrix belongs
Alejandro Espinosa-Rada
Wasserman, S. and Faust, K. (1994). Social network analysis: Methods and applications. Cambridge University Press.
A <- matrix(c(
0, 1, 1, 0, 0,
1, 0, 1, 0, 0,
1, 1, 0, 0, 0,
0, 0, 0, 0, 1,
0, 0, 0, 1, 0
), byrow = TRUE, ncol = 5)
rownames(A) <- letters[1:ncol(A)]
colnames(A) <- rownames(A)
components_id(A)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.