is_graph_directed: Is the graph a directed graph?

Description Usage Arguments Value Examples

View source: R/is_graph_directed.R

Description

Determines whether a graph is set to be directed or not and returns a logical value to that effect.

Usage

1

Arguments

graph

a graph object of class dgr_graph.

Value

a logical value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Create an empty graph; by default,
# new graphs made by `create_graph()`
# are directed
graph <-
  create_graph()

# Determine whether the graph
# is directed
graph %>%
  is_graph_directed()

# Use the `set_graph_undirected()`
# function and check again whether
# the graph is directed
graph %>%
  set_graph_undirected() %>%
  is_graph_directed()

DiagrammeR documentation built on March 18, 2018, 1:25 p.m.