Learn R Programming

dodgr (version 0.2.8)

dodgr_components: dodgr_components

Description

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

Usage

dodgr_components(graph)

Arguments

graph

A data.frame of edges

Value

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

Examples

Run this code
# NOT RUN {
graph <- weight_streetnet (hampi)
graph <- dodgr_components (graph)
# }

Run the code above in your browser using DataLab