shift_peaks: Helper function for correct_peaks. Return the shifted peaks...

View source: R/correct_peaks.R

shift_peaksR Documentation

Helper function for correct_peaks. Return the shifted peaks to local maxima or minima within a radius.

Description

Helper function for correct_peaks. Return the shifted peaks to local maxima or minima within a radius.

Usage

shift_peaks(sig, peak_inds, search_radius = 20, peak_up = TRUE)

Arguments

sig

The 1d signal vector

peak_inds

vector of the original peak indices

search_radius

The integer radius within which the original peaks may be shifted.

peak_up

: Whether the expected peak direction is up. TRUE/FALSE

Value

shifted_peak_inds vector of the corrected peak indices.


PennStateDEPENdLab/experiment.pipeline documentation built on April 14, 2024, 9:37 p.m.