Returns a list of matrices, each giving the river distance, direction, or upstream travel distance between all observations of one unique fish. This function is principally intended for producing an object to plot in plotmatbysurveylist.
matbysurveylist(unique, survey, seg, vert, rivers, indiv = NULL, method = "upstream", flowconnected = FALSE, net = FALSE, stopiferror = TRUE, algorithm = NULL)
unique | A vector of unique identifiers for each fish. |
---|---|
survey | A vector of identifiers for each survey. It is recommended to use a numeric or date format (see as.Date) to preserve survey order. |
seg | A vector of river locations (segment component). |
vert | A vector of river locations (vertex component). |
rivers | The river network object to use. |
indiv | A vector of unique individuals to use. Accepting the default ( |
method | Which general method to use. Setting |
flowconnected | Optional parameter to pass to the distance or direction calculation. Defaults to |
net | Optional parameter to pass to the distance or direction calculation. Defaults to |
stopiferror | Optional parameter to pass to the distance or direction calculation. Defaults to |
algorithm | Optional parameter to pass to the distance or direction calculation. Defaults to |
A list with each element corresponding to a unique fish. Each list element is the output from either riverdistancematbysurvey, riverdirectionmatbysurvey, or upstreammatbysurvey.
Building routes from the river mouth to each river network segment and/or distance lookup tables will greatly reduce computation time (see buildsegroutes).
riverdistance, riverdirection, upstream, riverdistancematbysurvey, riverdirectionmatbysurvey, upstreammatbysurvey, plotmatbysurveylist
data(Gulk, smallset) matbysurveylist <- matbysurveylist(unique=smallset$id, survey=smallset$flight, seg=smallset$seg, vert=smallset$vert, rivers=Gulk) plotmatbysurveylist(matbysurveylist)data(fakefish) # matbysurveylist <- matbysurveylist(unique=fakefish$fish.id, survey=fakefish$flight, # seg=fakefish$seg, vert=fakefish$vert, rivers=Gulk) # plotmatbysurveylist(matbysurveylist)