Bins heading angles into sectors and returns count and proportion per sector, optionally grouped by trial or condition. Useful for dwell-time analysis of dense per-frame heading series (e.g. gaze direction from a tethered animal).
Arguments
- hd
Data frame containing headings in radians.
- sectors
Either a single integer (number of equal sectors spanning the full circle, default
8) or a numeric vector of break points in radians. Break points need not include \(\pm\pi\); they are added automatically.- group_col
Column(s) to group by.
NULLuses all rows.- angle_col
Name of the heading column. Default
"heading".