add_topo_sort: Add topo_sort

View source: R/sort_network.R

add_topo_sortR Documentation

Add topo_sort

Description

calls sort_network without support for splitting the network and adds a nrow:1 topo_sort attribute.

Usage

add_topo_sort(x, outlets = NULL)

## S3 method for class 'data.frame'
add_topo_sort(x, outlets = NULL)

## S3 method for class 'hy'
add_topo_sort(x, outlets = NULL)

Arguments

x

data.frame network compatible with hydroloom_names.

outlets

same as id in x. if specified, only the network emanating from these outlets will be considered and returned. NOTE: If outlets does not include all outlets from a given network containing diversions, a partial network may be returned.

Value

data.frame containing a topo_sort attribute.


hydroloom documentation built on Sept. 11, 2024, 8:20 p.m.