catchstats includes a number of functions written by Chris Walsh for working with nested catchment or river-network data tables, to identify all upstream areas, all downstream areas, segments or sub-catchments between catchment pairs etc. All of these functions require a dataframe that includes a unique catchment identifier field (column) and a field (column) identifying the next downstream catchment id. Together these are referred to as a 'hierarchy table'.
To install run the following code:
# install devtools pacakge
install.packages(c("devtools"))
# install catchstats package
devtools::install_github("nickbond/catchstats")
# Remove the package zip after installation
unlink("catchstats.zip")
#load library
library(catchstats)
To be completed
Nick Bond [email protected]