
Per-group circular dispersion statistics for a dense heading series
Source:R/circular_statistics.R
circ_dispersion.RdComputes circular mean direction, mean resultant length R, circular
standard deviation, and sample size for each group. Designed for
within-trial summaries from pose_to_headings or
derive_headings(..., frame_select = "all"), but accepts any data
frame with an angle column.
Arguments
- hd
Data frame containing headings in radians.
- group_col
Column(s) to group by (e.g.
"id"for per-trial summaries).NULLtreats the entire data frame as one group.- angle_col
Name of the heading column. Default
"heading".- axial
Logical. Treat the angles as axial (bidirectional, mod-pi) data: statistics are computed via the angle-doubling method and the mean is reported as an axis in `[0, pi)` radians / `[0, 180)` degrees. Default `FALSE` (ordinary directional data).