set_upstream_recursive: Recursively set upstream stations

Description Usage Arguments Examples

Description

recursively sets all stations upstream of a target station

Usage

1
set_upstream_recursive(station, table, next_upstream, set_to = 1)

Arguments

station

target station to set

table

a data.table describing upstream / downstream relationships between stations.

next_upstream

the next station upstream of the target station

set_to

toggle between setting upstream (1) or not upstream(0)

Examples

1
2
3
M  <- initialize_matrix_from_stations(c('stn1', 'stn2', 'stn3', 'stn4'))
set_upstream('stn1', M, c('stn2', 'stn3'))
set_upstream_recursive('stn4', M, 'stn1')

ECCC-MSC/Basin-Delineation documentation built on June 9, 2019, 7:29 p.m.