Counts accepted speed peaks as movement units (submovements). A peak must exceed both a relative height threshold and a relative prominence threshold.
Usage
movementUnits(
speed,
fs = NULL,
height_frac = 0.05,
prominence_frac = 0.1,
min_peak_distance = NULL
)Arguments
- speed
Numeric non-negative tangential-speed profile.
- fs
Optional sampling frequency in Hz. Required only when
min_peak_distanceis supplied.- height_frac
Peak-height threshold as a fraction of maximum speed.
- prominence_frac
Minimum peak prominence as a fraction of maximum speed.
- min_peak_distance
Optional minimum inter-peak interval in seconds.
Value
Integer movement-unit count. Accepted 1-based peak indices are
stored in the "peaks" attribute.