Learn R Programming

spNetwork (version 0.4.4.6)

split_graph_components: 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)

Value

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

Arguments

graph_result

A list typically obtained from the function build_graph or build_graph_directed

Examples

Run this code
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)

Run the code above in your browser using DataLab