Submatrix of ego's neighbourhoods
Usage
ego_net(
A,
ego = NULL,
bipartite = FALSE,
addEgo = FALSE,
select = c("all", "in", "out")
)Value
This function returns the submatrix of the alters of ego, with ego in the last row and column when addEgo = TRUE.
An isolate gives an empty matrix (or a 1 x 1 matrix with ego).
References
Burt, R.S., 1992. Structural Holes: the Social Structure of Competition. Harvard University Press, Cambridge.
Borgatti, S., 1997. Unpacking Burt's redundancy measure. Connections, 20(1): 35-38.
Examples
A <- matrix(c(
0, 1, 0, 0, 1, 1, 1,
1, 0, 0, 1, 0, 0, 1,
0, 0, 0, 0, 0, 0, 1,
0, 1, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 1,
1, 1, 1, 1, 1, 1, 0
), ncol = 7, byrow = TRUE)
rownames(A) <- letters[1:nrow(A)]
colnames(A) <- letters[1:ncol(A)]
ego_net(A, ego = "g")
#> a b c d e f
#> a 0 1 0 0 1 1
#> b 1 0 0 1 0 0
#> c 0 0 0 0 0 0
#> d 0 1 0 0 0 0
#> e 1 0 0 0 0 0
#> f 1 0 0 0 0 0
