find_peaks {impactr} | R Documentation |
Find peaks in a signal
Description
Find peaks in the acceleration signal.
Usage
find_peaks(data, vector, min_height = 1.3, min_dist = 0.4)
Arguments
data |
An |
vector |
A character string indicating in which acceleration vector to find the peaks. Can be "resultant", "vertical" or "all". |
min_height |
The minimum height of the peaks (in g). |
min_dist |
The minimum horizontal distance between peaks (in seconds). |
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).
When the vector
parameter is set to "all", there may contain
NA
values in the resultant_peak_acc
and/or
vertical_peak_acc
at the timestamps in which a peak value for that
vector could not be identified.
The default values of min_height
and min_dist
are
matching the criteria used in the paper by Veras et al. that developed the
mechanical loading prediction equations (see References)
Value
An object of class impactr_peaks
with the peaks magnitude
stored in the columns.
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"))
data <- use_resultant(data)
find_peaks(data, vector = "resultant")