View source: R/apps_of_riverdistance.R
| riverdistancemat | R Documentation | 
Returns a matrix of distances between every point and every other point of given river locations (segment and vertex), or of a subset.
riverdistancemat(
  seg,
  vert,
  rivers,
  logical = NULL,
  ID = NULL,
  stopiferror = TRUE,
  algorithm = NULL
)
seg | 
 A vector of river locations (segment component).  | 
vert | 
 A vector of river locations (vertex component).  | 
rivers | 
 The river network object to use.  | 
logical | 
 A boolean vector that can be used for subsetting.  If used,
  | 
ID | 
 a vector of observation IDs for aid in interpreting the output table  | 
stopiferror | 
 Whether or not to exit with an error if a route cannot be
found.  If this is set to   | 
algorithm | 
 Which route detection algorithm to use (  | 
A matrix of distances (numeric) with rows and columns labeled by corresponding values of ID.
Building routes from the river mouth to each river network segment and/or distance lookup tables will greatly reduce computation time (see buildsegroutes).
Matt Tyers
riverdistance
data(Gulk, fakefish)
logi1 <- (fakefish$flight.date==as.Date("2015-11-25"))
riverdistancemat(seg=fakefish$seg, vert=fakefish$vert, rivers=Gulk, logical=logi1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.