Skip to contents

Basic query operations

Usage

vcount(graph)

ecount(graph)

is_directed(graph)

Arguments

graph

An igraph_ptr object.

Value

vcount() returns the number of vertices in a graph.

ecount() returns the number of edges in a graph.

is_directed() returns whether the graph is directed.

Examples

g = graph_tree(5L)
vcount(g)
#> [1] 5
ecount(g)
#> [1] 4
is_directed(g)
#> [1] TRUE