The mean direction of a set of angles and its circular spread, computed via the resultant vector (so the wrap-around at 0/360 is handled correctly).
Usage
circularSummary(angles, units = c("degrees", "radians"))Value
a circular_summary list: mean (mean direction), R (resultant
length), rbar (mean resultant length in [0,1]), variance
(1 - rbar), sd (circular SD), kappa (von Mises concentration), all in
the input units where applicable.
Examples
circularSummary(c(10, 20, 350, 355))$mean # ~ 0, not ~180
#> [1] 3.733701