From the documentation of graph.density() “The density of a graph is the ratio of the number of edges and the number of possible edges.”
graph.density()
densities <- lapply(ego_nets_simple, graph.density) densities <- unlist(densities)
hist(densities)