split_graph_components: Split graph components

View source: R/graph_functions_sf.R

split_graph_componentsR Documentation

Split graph components

Description

Function to split the results of build_graph and build_graph_directed into their sub components

Usage

split_graph_components(graph_result)

Arguments

graph_result

A list typically obtained from the function build_graph or build_graph_directed

Value

A list of lists, the graph_result split for each graph component

Examples

data(mtl_network)
mtl_network$length <- as.numeric(sf::st_length(mtl_network))
graph_result <- build_graph(mtl_network, 2, "length", attrs = TRUE)
sub_elements <- split_graph_components(graph_result)

spNetwork documentation built on Aug. 24, 2023, 5:10 p.m.