ch_rfa_distseason {CSHShydRology} | R Documentation |
Distance in seasonal space
Description
Calculates a matrix of distances between points in the seasonal space that characterizes timing and regularity. It is equivalent to Euclidean distance applied to regularity (radius) and timing (angle) separately.
Usage
ch_rfa_distseason(x, ...)
## S3 method for class 'numeric'
ch_rfa_distseason(x, a, w = 1/pi, ...)
## S3 method for class 'data.frame'
ch_rfa_distseason(x, w = 1/pi, ...)
## S3 method for class 'formula'
ch_rfa_distseason(form, x, w = 1/pi, ...)
Arguments
x , a |
Coordinates in the seasonal space.
Can be a data.frame or vectors with radius |
... |
Other parameters. |
w |
Weight to favor angle over radius. By default it is 1/pi, which bring angle in the interval [0,1]. |
form |
Formula and dataset providing the coordinates of the
seasonal space. Must be of the form |
Value
Returns a matrix of distances between points in the seasonal space that characterizes timing and regularity.
Author(s)
Martin Durocher
References
Durocher, M., Burn, D. H., & Ashkar, F. (2019). Comparison of estimation methods for a nonstationary index-flood model in flood frequency analysis using peaks over threshold. https://doi.org/10.31223/osf.io/rnepc
See Also
Examples
scoord <- data.frame(radius = runif(5),
angle = runif(5,0,2*pi))
ch_rfa_distseason(radius ~ angle , scoord)