is_graph_directed {DiagrammeR} | R Documentation |
Determines whether a graph is set to be directed or not and returns a logical value to that effect.
is_graph_directed(graph)
graph |
a graph object of class |
a logical value.
## Not run: # Create a graph with nodes and edges nodes <- create_nodes(nodes = c("a", "b", "c", "d")) edges <- create_edges(from = c("a", "b", "c"), to = c("d", "c", "a")) graph <- create_graph(nodes_df = nodes, edges_df = edges) # Determine whether the graph is directed is_graph_directed(graph) #> [1] TRUE ## End(Not run)