Sample median direction for a vector of circular data
Usage
circular_sample_median(x, axial = TRUE, na.rm = TRUE)
circular_sample_median_deviation(x, axial = TRUE, na.rm = TRUE)
Arguments
- x
numeric vector. Values in degrees.
- 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 in x
should be stripped before the computation proceeds.
References
N.I. Fisher (1993) Statistical Analysis of Circular Data, Cambridge University Press.
Examples
x <- rvm(n = 100, mean = 0, kappa = 1)
circular_sample_median(x)
#> [1] 154.9934
circular_sample_median_deviation(x)
#> [1] 40.01747
data("san_andreas")
circular_sample_median(san_andreas$azi)
#> [1] 2
circular_sample_median_deviation(san_andreas$azi)
#> [1] 18.086