peaks | R Documentation |
Set of functions to record statistics about peaks of movements. Especially used to identify distinct movements of the head.
peaks_stats(df, var = NULL, smooth = 10, thresh = 5)
nvb_peaks(df, var, smooth = 10, thresh = 5)
df |
the dataframe in which the variables are stored or a dataframe of peaks values. |
var |
the target variable in the dataframe. |
smooth |
the smooth parameter is used to smooth the descriptive curve and avoid the inclusion of very small differences in values. The default (advised) is 10. |
tresh |
it indicates the minimum threshold to use to determine peaks used by Pracma "findPeaks" function. The default (5) is advised. |
# Describes the frequency of Teddy moving the head horizontaly
peaks_stats(teddy, var = pose_Tx, smooth = 10, thresh = 5)
# Find the peaks of horizontal head motion for Lara
nvb_peaks(lara, var = pose_Tx, smooth = 10, thresh = 5)
# Find Lara peaks and sumarise them (with conservative parameters)
lara_peaks <- nvb_peaks(lara, var = pose_Tx, smooth = 20, thresh = 10)
peaks_stats(lara_peaks)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.