net.prox {stream.net} | R Documentation |
Calculate the segments that are in a specified neighborhood of a given segment.
net.prox (dist, seg, lag=1, direction="both")
dist |
an upstream/downstream distance matrix from
net.dist . |
seg |
index to a segment (row number in segment
table). Not necessarily the segment identifier (sid ),
except that in networks generated by net.qmodel
the index and the sid are always identical. |
lag |
distance within which neighborhood is computed,
either in coordinates or segments (depending on how
dist was constructed. |
direction |
"up" , "down" , or
"both" . |
This returns a vector of segments in proximity of seg
in the direction "up"
, "down"
, or
"both"
. Siblings that are in a combination of
upstream and downstream directions are not included in
"up"
or "down"
. The distance matrix
determines whether the neighborhood is defined by number
of segments or by coordinates.
A vector of segment indices.
Denis White, white.denis@epa.gov
net.total.dist
net.dir
net.prox
# Q model random net net <- net.qmodel (10) # add segments net <- net.addsegs (net) # distance matrix net.map (net, segatt=round (net$segs$length, 2)) dmat <- net.dist (net, ends=0.5, method="coordinate") # proximities net.prox (dmat, seg=2, lag=3) net.prox (dmat, seg=2, lag=3, direction="up")