powered by
given a variable, accumulate according to network topology.
accumulate_downstream(x, var)# S3 method for data.frame accumulate_downstream(x, var)# S3 method for hy accumulate_downstream(x, var)
# S3 method for data.frame accumulate_downstream(x, var)
# S3 method for hy accumulate_downstream(x, var)
vector of the same length as nrow(x) containing values of var accumulated downstream
nrow(x)
var
data.frame network compatible with hydroloom_names.
variable to accumulate.
x <- sf::read_sf(system.file("extdata/new_hope.gpkg", package = "hydroloom")) x$totDASqKM <- accumulate_downstream(add_toids(x), "AreaSqKM") plot(x['totDASqKM'], lwd = x$totDASqKM / 50)
Run the code above in your browser using DataLab