filter_acc {impactr} | R Documentation |
Filter the acceleration signal
Description
Filter the acceleration signal using a butterworth digital filter.
Usage
filter_acc(data, order = 4, cutoff = 20, type = "lowpass")
Arguments
data |
An |
order |
The order of the filter. Defaults to 4. |
cutoff |
The filter cut-off frequency in Hz. Defaults to 20. For low- and high-pass filters, must be a scalar. For band-pass and band- stop, a vector of length two. |
type |
The type of filter. Defaults to "lowpass". Can be "lowpass", "highpass", "bandpass" or "bandstop". |
Details
The default values of the filter parameters are matching the filter used in the paper by Veras et al. that developed the mechanical loading prediction equations (see References).
Value
An object of class impactr_data
.
References
Veras L, Diniz-Sousa F, Boppre G, Devezas V, Santos-Sousa H, Preto J, Machado L, Vilas- Boas JP, Oliveira J, Fonseca H. Accelerometer-based prediction of skeletal mechanical loading during walking in normal weight to severely obese subjects. Osteoporosis International. 2020. 31(7):1239- 1250. doi:10.1007/s00198-020-05295-2.
Examples
data <- read_acc(impactr_example("hip-raw.csv"))
filter_acc(data)