addSUPERNODE: Add supersource and supersink nodes

View source: R/addSUPERNODE.R

addSUPERNODER Documentation

Add supersource and supersink nodes

Description

These nodes will later act as source and sink nodes which initiate and terminate the population flow through the network. More specifically, they are added to the distance matrix with values of zero (for the time being)

Usage

addSUPERNODE(dist, sources, sinks)

Arguments

dist

This is a distance matrix between two sites

sources

vector of site names to be added as sources from the supersource node

sinks

vector of site names to be added as sinks to the supersink node

Value

A distance matrix in kilometres between all pairs sites

Examples

dta <- data.frame(Site= LETTERS[1:4], Lat= 1:4, Lon= 5:8, Pop=100:103)
dist <- point2DIST(dta)
addSUPERNODE(dist, sources = 1, sinks = nrow(dta))




KiranLDA/migflow documentation built on June 14, 2025, 9:09 a.m.