View source: R/count_w_connected_cmpts.R
count_w_connected_cmpts | R Documentation |
Get the number of weakly-connected components in the graph.
count_w_connected_cmpts(graph)
graph |
A graph object of class |
A single integer value representing the number of weakly-connected graph components.
# Create a cycle graph
graph <-
create_graph() %>%
add_cycle(n = 5) %>%
add_cycle(n = 5)
# Get a count of weakly-connected
# components in the graph
graph %>% count_w_connected_cmpts()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.