set_upstream: Set upstream station

Description Usage Arguments Value Examples

Description

For a target station, sets a list of stations as 'upstream'

Usage

1
set_upstream(station, table, upstream, set_to = 1)

Arguments

station

name of a target station for which upstream stations are to be defined.

table

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

upstream

a character vector of stations in table that are upstream of the target station.

set_to

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

Value

Does not return a value, the table is modified in-place.

Examples

1
2
3
4
r <- initialize_matrix_from_stations(c('stn1', 'stn2', 'stn3'))
set_upstream('stn1', r, 'stn2')

 @export

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