Learn R Programming

trafficCAR (version 0.1.0)

simplify_network: Simplify a built network object by removing parallel edges (and loops)

Description

Simplify a built network object by removing parallel edges (and loops)

Usage

simplify_network(net, keep_edge = c("first", "shortest"))

Value

A network list with updated `edges`, `graph`, and `A` (and the same `nodes`).

Arguments

net

A network list returned by [build_network()].

keep_edge

Which edge to keep when multiple edges connect the same unordered node pair. One of "first" or "shortest".