Description Usage Arguments Value Examples

View source: R/count_w_connected_cmpts.R

Get the number of weakly-connected components in the graph.

1 | ```
count_w_connected_cmpts(graph)
``` |

`graph` |
A graph object of class |

A single integer value representing the number of weakly-connected graph components.

1 2 3 4 5 6 7 8 9 | ```
# 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()
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.