Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/structural.properties.R

Finds all vertices reachable from a given vertex, or the opposite: all vertices from which a given vertex is reachable via a directed path.

1 | ```
subcomponent(graph, v, mode = c("all", "out", "in"))
``` |

`graph` |
The graph to analyze. |

`v` |
The vertex to start the search from. |

`mode` |
Character string, either “in”, “out” or
“all”. If “in” all vertices from which |

A breadh-first search is conducted starting from vertex `v`

.

Numeric vector, the ids of the vertices in the same component as
`v`

.

Gabor Csardi csardi.gabor@gmail.com

1 2 3 4 | ```
g <- sample_gnp(100, 1/200)
subcomponent(g, 1, "in")
subcomponent(g, 1, "out")
subcomponent(g, 1, "all")
``` |

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.