View source: R/is_graph_empty.R
| is_graph_empty | R Documentation | 
Provides a logical value on whether the graph is empty (i.e., contains no nodes).
is_graph_empty(graph)
| graph | A graph object of class  | 
A logical value.
# Create an empty graph
graph <- create_graph()
# Determine whether the graph is empty
graph %>% is_graph_empty()
# Create a non-empty graph
graph <-
  create_graph() %>%
  add_n_nodes(n = 3)
# Determine whether this graph is empty
graph %>% is_graph_empty()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.