I have a spatial dataframe in R corresponding to a river network where individual rivers each have a unique ID like id=c(832,832,837,840,840,840) and reaches within
id=c(832,832,837,840,840,840)