Count the number of edges in the graph
count_edges(x)
integer
Returns the number of edges in an object of class network
or igraph
.
net <- igraph::random.graph.game(10, p.or.m = .15, type = "gnp")
count_edges(net)
#> [1] 10
net <- sna::rgraph(n = 10, tprob = 0.15) |> network::as.network()
count_edges(net)
#> [1] 19