riverreach: returns list of subcatchments between 2 subcatchments on the...

Description Usage Arguments Value Note Examples

View source: R/riverreach.R

Description

returns list of subcatchments between 2 subcatchments on the same river ordered upstream to downstream

Usage

1
riverreach(hierarchy, upstream, downstream, riverdist = NULL)

Arguments

hierarchy

a dataframe containing catchment id and next downstream (nextds) id fields. Hierarchy must have fields 'site' and 'nextds'

upstream

the upstream subcatchment id

downstream

the downstream subcatchment id

riverdist

?

Value

Returns list of subcatchments between 2 subcatchments on the same river.

Note

riverdist, if used, should be the column number of the riverdistance measure in hierarchy. Returns the following error if downstream is not downstream of upstream: Error in while (y != downstream) : argument is of length zero' Note that unlike pairReaches riverreach preserves ordering but cannot trace down and then up tributaries.

Examples

1
2
3
data(mwcats)
#function needs checking.
#riverreach(hierarchy = mwcats[,c(1:2)], upstream='YARR2415', downstream='YARR001')

nickbond/catchstats documentation built on Nov. 22, 2019, 3:41 a.m.