peaks: Peaks.

peaksR Documentation

Peaks.

Description

Set of functions to record statistics about peaks of movements. Especially used to identify distinct movements of the head.

Usage

peaks_stats(df, var = NULL, smooth = 10, thresh = 5)

nvb_peaks(df, var, smooth = 10, thresh = 5)

Arguments

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.

Examples

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

davidecannatanuig/openFaceR documentation built on Feb. 28, 2024, 7:21 p.m.