Description Usage Arguments Value Note Examples
View source: R/list_all_upstream.R
Identify all the subcatchments upstream of a list of specified catchments
1 | list_all_upstream(hierarchy, catchnames)
|
hierarchy |
a dataframe containing catchment id and next downstream (nextds) id fields |
catchnames |
a vector of catchment ids for which a a list of upstream catchment ids will be returned. |
a list of upstream catchment ids for each catchment in catchnames
Function depends on the next downstream field in a stream network 'hierarchy' table (dataframe). Can be used to support further aggregation of environmental variables for sub-catchments downstream of a list of catchments of interest (e.g. for calculating barrier numbers).
1 2 3 4 5 6 | #'data(mwcats)
#find all sites upstream of the first five sites in the catchment list
data(mwcats)
list_all_upstream(hierarchy = mwcats, catchname = mwcats$site[1:5])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.