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

is_graph_directed

Is the graph a directed graph?


Description

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

Usage

is_graph_directed(graph)

Arguments

graph

A graph object of class dgr_graph.

Value

A logical value.

Examples

# 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

Graph/Network Visualization

v1.0.6.1
MIT + file LICENSE
Authors
Richard Iannone [aut, cre] (<https://orcid.org/0000-0003-3925-190X>)
Initial release

We don't support your browser anymore

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