Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gsize

The size of the graph (number of edges)


Description

ecount of an alias of this function.

Usage

gsize(graph)

Arguments

graph

The graph.

Value

Numeric scalar, the number of edges.

See Also

Examples

g <- sample_gnp(100, 2/100)
gsize(g)

# Number of edges in a G(n,p) graph
replicate(100, sample_gnp(10, 1/2), simplify = FALSE) %>%
  vapply(gsize, 0) %>%
  hist()

igraph

Network Analysis and Visualization

v1.2.10
GPL (>= 2)
Authors
See AUTHORS file.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.