riverreach | R Documentation |
returns list of subcatchments between 2 subcatchments on the same river ordered upstream to downstream
riverreach(hierarchy, upstream, downstream, riverdist = NULL)
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 |
? |
Returns list of subcatchments between 2 subcatchments on the same river.
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.
data(mwcats)
#function needs checking.
#riverreach(hierarchy = mwcats[,c(1:2)], upstream='YARR2415', downstream='YARR001')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.