Circular Mean Difference
Usage
circular_mean_difference(x, w = NULL, axial = TRUE, na.rm = TRUE)
circular_mean_difference_alt(x, w = NULL, axial = TRUE, na.rm = TRUE)
Arguments
- x
numeric vector. Values in degrees.
- w
(optional) Weights. A vector of positive numbers and of the same length as
x
.- axial
logical. Whether the data are axial, i.e. pi-periodical (
TRUE
, the default) or directional, i.e. \(2 \pi\)-periodical (FALSE
).- na.rm
logical value indicating whether
NA
values inx
should be stripped before the computation proceeds.
References
Mardia, K.V., and Jupp, P.E (1999). Directional Statistics, Wiley Series in Probability and Statistics. John Wiley & Sons, Inc., Hoboken, NJ, USA. doi:10.1002/9780470316979
Examples
data("san_andreas")
circular_mean_difference(san_andreas$azi)
#> [1] 0.6309056
circular_mean_difference(san_andreas$azi, 1 / san_andreas$unc)
#> [1] 0.7099324
circular_mean_difference_alt(san_andreas$azi)
#> [1] 25.18682
circular_mean_difference_alt(san_andreas$azi, 1 / san_andreas$unc)
#> [1] 26.25729