Description Usage Arguments Details Value Examples
Calculate distance along thalweg profile from a sequence of station numbers and increments between stations. The first station number is expected to be 0. Here, the distance will be 0. The increments are assumed to be the distance from the previous station.
1 | calculateDistanceAlongThalweg(station, increment, is.wadeable, uid = NULL)
|
station |
a vector of station ids, starting at 0. |
increment |
a vector of distances from the previous station to the current |
is.wadeable |
logical, TRUE if the measurement comes from a wadeable site |
uid |
an optional site indicator or grouping variable. Calculations are
performed separately for group defined by |
Not sure if station is really necessary. Only necessary if there are missing values in station numbers. That is, if the sequence is allowed to skip from station 8 to 10 with no station 9. This implementation acknowledges that, using diffinv if there are no station gaps.
In addition, there seems to be a problem with which increment values are used in wadeable versus boatable sites to figure the distance. This may make some sort of sense because of the reversal of wadeable versus boatable sampling directions. This adds some complexity to the function and requires the protocol.
a vector of distances
1 2 3 | calculateDistanceAlongThalweg(0:9, rep(5,10))
calculateDistanceAlongThalweg(c(0:8,11), rep(5,10))
calculateDistanceAlongThalweg(rep(0:4, times = 2), rep(5,10), rep(1:2, each = 5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.