routeSDG: Accumulate sources/sinks along a directed SpatialGraph

View source: R/routeSDG.R

routeSDGR Documentation

Accumulate sources/sinks along a directed SpatialGraph

Description

Assume a SpatialGraph is directed and conduct an accumulation of source/sink values at nodes across the network. The accumulation assumes no delay in transmission

Usage

routeSDG(SDG, FUN='cumsum', ifld='inflow')

Arguments

SDG

SpatialGraph, assumed as directed

FUN

name of a function to be applied for the routing

ifld

name on the field in the SpatialPointDataFrame vertex slot to be used used as source/sink

Details

The SpatialGraph, used as input, must have the ifld field to be used as input, in the vertices slot v (a SpatialPointsDataFrame). The accumulated output is provided as the new field ofld in v. The edges slot e serves to route the input across the network

Value

A SpatialGraph with the added ofld field in the vertex slot


SpatialGraph documentation built on Sept. 28, 2023, 5:08 p.m.