# Create an empty graph
graph <- create_graph()
# Determine whether the graph is empty
is_graph_empty(graph)
#> [1] TRUE
# 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 empty
is_graph_empty(graph)
#> [1] FALSE
Run the code above in your browser using DataLab