Convenience helper to create a simple chain network from site coordinates by
ordering sites along a variable (e.g., river-km, coastline order).
Usage
build_network_edges(
site_coords,
order_by = NULL,
wrap = FALSE,
directed = FALSE
)
Arguments
- site_coords
Data frame with at least site.
- order_by
Optional numeric vector or column name in site_coords used
to order sites.
- wrap
Logical; connect last site back to first.
- directed
Logical; whether to treat edges as directed.
Value
Data frame with columns from, to, weight.