nearestDownstreamNeighbor: Construct a matrix identifying the nearest downstream...

View source: R/topology.r

nearestDownstreamNeighborR Documentation

Construct a matrix identifying the nearest downstream neighbor from a list of sites

Description

Construct a matrix identifying the nearest downstream neighbor from a list of sites

Usage

nearestDownstreamNeighbor(ws, x, siteNames)

Arguments

ws

A watershed

x

A vector of pixel IDs

names

Optional vector of site names

Value

A 2-column matrix; the first column gives the ID of a pixel, the second its nearest downstream neighbor. Pixels in 'x' that have no nearest neighbor are excluded. If 'names' is specified, the output matrix will give site names instead of pixelIDs


mtalluto/WatershedTools documentation built on May 21, 2022, 7:49 p.m.