Description Usage Arguments Value Note Examples
View source: R/alldownstream.R
Return a vector of all subcatchments downstream of a specified catchment
1 | alldownstream(hierarchy, catchname)
|
hierarchy |
a dataframe containing catchment id and next downstream (nextds) id fields |
catchname |
a dataframe containing catchment id for which a vector of downstream catchment ids will be returned. |
a vector of downstream catchment ids
Function depends on the next downstream field in a stream network 'hierarchy' table (dataframe). When used in conjunction with list_all_downstream it is possible to get a list of catchments downstream of a vector of sites. This can then 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 | #find all sites downstream of the first site in the catchment list
data(mwcats)
alldownstream(hierarchy = mwcats, catchname = mwcats$site[1])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.