View source: R/count_s_connected_cmpts.R

count_s_connected_cmpts | R Documentation |

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

```
count_s_connected_cmpts(graph)
```

`graph` |
A graph object of class |

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

```
# Create a graph and add
# several graph islands
graph <-
create_graph() %>%
add_islands_graph(
n_islands = 4,
island_size = 10,
p = 1/5,
edges_between = 1,
set_seed = 23)
# Get a count of strongly-connected
# components in the graph
graph %>% count_s_connected_cmpts()
```

DiagrammeR documentation built on May 31, 2023, 6:14 p.m.

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.