simplify_network | R Documentation |
Construct a simple version of the network. A simple network is defined as a network without loop edges and multiple edges. A loop edge is an edge that starts and ends at the same node. Multiple edges are different edges between the same node pair.
simplify_network(
x,
remove_multiple = TRUE,
remove_loops = TRUE,
attribute_summary = "first",
store_original_ids = FALSE,
store_original_data = FALSE
)
x |
An object of class |
remove_multiple |
Should multiple edges be merged into one. Defaults
to |
remove_loops |
Should loop edges be removed. Defaults to |
attribute_summary |
How should the attributes of merged multiple
edges be summarized? There are several options, see
|
store_original_ids |
For each group of merged multiple edges, should
the indices of the original edges be stored as an attribute of the new edge,
in a column named |
store_original_data |
For each group of merged multiple edges, should
the data of the original edges be stored as an attribute of the new edge, in
a column named |
The simple network as object of class sfnetwork
.
When merging groups of multiple edges into a single edge, the geometry
of the first edge in each group is preserved. The order of the edges can be
influenced by calling arrange
before simplifying.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.