# gsize

From igraph v1.0.0
by Gabor Csardi

##### The size of the graph (number of edges)

`ecount`

of an alias of this function.

##### Usage

`gsize(graph)`

##### Arguments

- graph
- The graph.

##### Value

- Numeric scalar, the number of edges.

##### See Also

Other structural queries: `[.igraph`

;
`[[.igraph`

; `adjacent_vertices`

;
`are.connected`

, `are_adjacent`

;
`ends`

, `get.edge`

,
`get.edges`

; `get.edge.ids`

;
`gorder`

, `vcount`

;
`head_of`

; `incident_edges`

;
`incident`

; `is.directed`

,
`is_directed`

; `neighbors`

;
`tail_of`

##### 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()
```

*Documentation reproduced from package igraph, version 1.0.0, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.