Learn R Programming

dodgr (version 0.4.2)

dodgr_components: Identify connected components of graph.

Description

Identify connected components of graph and add corresponding component column to data.frame.

Usage

dodgr_components(graph)

Value

Equivalent graph with additional component column, sequentially numbered from 1 = largest component.

Arguments

graph

A data.frame of edges

See Also

Other modification: dodgr_contract_graph(), dodgr_uncontract_graph()

Examples

Run this code
graph <- weight_streetnet (hampi)
graph <- dodgr_components (graph)

Run the code above in your browser using DataLab