Learn R Programming

CSHShydRology (version 1.4.2)

ch_rfa_distseason: 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 numeric ch_rfa_distseason(x, a, w = 1/pi, ...)

# S3 method for data.frame ch_rfa_distseason(x, w = 1/pi, ...)

# S3 method for formula ch_rfa_distseason(form, x, w = 1/pi, ...)

Value

Returns a matrix of distances between points in the seasonal space that characterizes timing and regularity.

Arguments

x, a

Coordinates in the seasonal space. Can be a data.frame or vectors with radius x and angle a.

...

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 radius ~ angle.

Author

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

ch_rfa_seasonstat

Examples

Run this code

scoord <- data.frame(radius = runif(5), 
                     angle = runif(5,0,2*pi))

ch_rfa_distseason(radius ~ angle , scoord)


Run the code above in your browser using DataLab