Skip to contents

Check whether a graph is directed

Usage

is_directed(graph)

Arguments

graph

The input graph

Value

Logical scalar, whether the graph is directed.

See also

Examples

g <- make_ring(10)
is_directed(g)
#> [1] FALSE

g2 <- make_ring(10, directed = TRUE)
is_directed(g2)
#> [1] TRUE