library(magrittr)
# Create an empty graph
graph <- create_graph()
# Determine whether the graph is empty
is_graph_empty(graph)
#> [1] TRUE
# Create a non-empty graph
graph <-
create_graph() %>%
add_n_nodes(3)
# Determine whether this graph is empty
is_graph_empty(graph)
#> [1] FALSE
Run the code above in your browser using DataLab