addSUPERNODE: Add supersource and supersink nodes

Description Usage Arguments Value Examples

View source: R/addSUPERNODE.R

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

1
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

1
2
3
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 Aug. 8, 2019, 8:55 p.m.