Learn R Programming

impactr (version 0.4.2)

filter_acc: Filter the acceleration signal

Description

Filter the acceleration signal using a butterworth digital filter.

Usage

filter_acc(data, order = 4, cutoff = 20, type = "lowpass")

Value

An object of class impactr_data.

Arguments

data

An impactr_data object, as obtained with read_acc().

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).

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. tools:::Rd_expr_doi("https://doi.org/10.1007/s00198-020-05295-2").

Examples

Run this code
data <- read_acc(impactr_example("hip-raw.csv"))
filter_acc(data)

Run the code above in your browser using DataLab