Usage
filter_movement(
data,
method = c("rollmedian", "rollmean", "kalman", "sgolay", "lowpass", "highpass",
"lowpass_fft", "highpass_fft"),
use_derivatives = FALSE,
...
)
Arguments
- data
A data frame containing movement tracking data with the following required columns:
individual
: Identifier for each tracked subjectkeypoint
: Identifier for each tracked pointx
: x-coordinatesy
: y-coordinatestime
: Time values Optional columns:z
: z-coordinates
- method
Character string specifying the smoothing method. Options:
"kalman"
: Kalman filter (seefilter_kalman()
)"sgolay"
: Savitzky-Golay filter (seefilter_sgolay()
)"lowpass"
: Low-pass filter (seefilter_lowpass()
)"highpass"
: High-pass filter (seefilter_highpass()
)"lowpass_fft"
: FFT-based low-pass filter (seefilter_lowpass_fft()
)"highpass_fft"
: FFT-based high-pass filter (seefilter_highpass_fft()
)"rollmean"
: Rolling mean filter (seefilter_rollmean()
)"rollmedian"
: Rolling median filter (seefilter_rollmedian()
)
- use_derivatives
Filter on the derivative values instead of coordinates (important for e.g. trackball or accelerometer data)
- ...
Additional arguments passed to the specific filter function
Details
This function is a wrapper that applies various filtering methods to x and y (and z if present) coordinates. Each filtering method has its own specific parameters - see the documentation of individual filter functions for details:
filter_kalman()
: Kalman filter parametersfilter_sgolay()
: Savitzky-Golay filter parametersfilter_lowpass()
: Low-pass filter parametersfilter_highpass()
: High-pass filter parametersfilter_lowpass_fft()
: FFT-based low-pass filter parametersfilter_highpass_fft()
: FFT-based high-pass filter parametersfilter_rollmean()
: Rolling mean parameters (window_width, min_obs)filter_rollmedian()
: Rolling median parameters (window_width, min_obs)