- data
A data frame containing the time series data. Must include person, time, and keypoints (e.g., x0, y0, etc.).
- method
The smoothing method to use. Options are "zoo" (moving average),
"kza" (Kalman-Ziegler Adaptive), "savitzky" (Savitzky-Golay filter),
and "butterworth" (Butterworth filter). Default is "zoo".
- kza_k
Window size for the KZA method. Default is 3.
- kza_m
Number of iterations for the KZA method. Default is 2.
- rollmean_width
Width of the moving average window for the zoo method. Default is 3.
- sg_window
Window size for the Savitzky-Golay filter. Default is 5.
- sg_order
Polynomial order for the Savitzky-Golay filter. Default is 3.
- butter_order
Order of the Butterworth filter. Default is 3.
- butter_cutoff
Cutoff frequency for the Butterworth filter. Default is 0.1.
- side
Character string indicating which side of the data to smooth.
Options are "left", "right", or "both". Default is "both".
- plot
Logical, if TRUE, the function will generate a plot comparing the original
and smoothed data. If FALSE, the function returns only the smoothed data frame without plotting. Default is TRUE.
- keypoints
Vector of keypoint column names (e.g., x0, x1) to be smoothed and included in the plot.
If NULL, all keypoints beginning with x or y will be smoothed and plotted. Default is NULL.