Description Usage Arguments Note Examples
Create a list of all reaches between two sites in a river network (inclusive of those sites)
1 | pairReaches(hierarchy, site1, site2)
|
hierarchy |
a dataframe containing catchment id and next downstream (nextds) id fields. |
site1 |
a site in a river network |
site2 |
a site in the same river network as site1 (can be up or downstream) |
Produces a vector of sites between the site pair
1 2 3 4 5 6 7 8 9 10 | data(mwcats)
#create a dataframe of pair reaches
pairReaches(hierarchy=mwcats[,c(1:2)], mwcats$site[1], mwcats$site[5])
#create a dataframe with all pairs from a vector of sites
df<- all_pairs(mwcats$site[1:5])
#create a list of sites between each site pair
apply(df,1 , function(x) pairReaches(hierarchy=mwcats[,c(1:2)], x[[1]],x[[2]]))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.