9.2 Number of vertices
Number of vertices
<- lapply(ego_nets_simple, vcount)
network_sizes head(network_sizes)
## [[1]]
## [1] 4
##
## [[2]]
## [1] 4
##
## [[3]]
## [1] 5
##
## [[4]]
## [1] 3
##
## [[5]]
## [1] 3
##
## [[6]]
## [1] 5
<- unlist(network_sizes)
network_sizes mean(network_sizes, na.rm = T)
## [1] 3.242915
hist(network_sizes, main = "Histogram of Ego Network Sizes", xlab = "Network Size")