Obtain the within-block networks defined by the block attribute.
get_within_networks.Rd
Function to return a list of networks, each network representing the within-block network of a block.
Arguments
- network
a network object
- block
a vector of integers representing the block of each node
- combined_networks
a boolean indicating whether the between-block networks should be returned as a
combined_networks
object or not (default is TRUE)
Examples
# Load an embedded network object.
data(toyNet)
get_within_networks(toyNet, toyNet %v% "block")
#> Combined 4 networks on ‘.NetworkID’/‘.NetworkName’:
#> 1: n = 50, directed = FALSE, bipartite = FALSE, loops = FALSE
#> 2: n = 50, directed = FALSE, bipartite = FALSE, loops = FALSE
#> 3: n = 50, directed = FALSE, bipartite = FALSE, loops = FALSE
#> 4: n = 50, directed = FALSE, bipartite = FALSE, loops = FALSE
#>
#> Network attributes:
#> vertices = 200
#> directed = FALSE
#> hyper = FALSE
#> loops = FALSE
#> multiple = FALSE
#> bipartite = FALSE
#> ergm:
#> Length Class Mode
#> constraints 2 formula call
#> total edges= 1165
#> missing edges= 0
#> non-missing edges= 1165
#>
#> Vertex attribute names:
#> .NetworkID .NetworkName block vertex.names x y
#>
#> Edge attribute names not shown