cycles_from_peaks: Make cycle labels

View source: R/utility_functions.R

cycles_from_peaksR Documentation

Make cycle labels

Description

Create a cycle labels, 1 to nCycles, given a list of turning points found using peaksign The testing direction (i.e. what is a peak) is found by checking sign of the first peak The output can be used for grouping a data.table by cycle

Usage

cycles_from_peaks(peaks)

Arguments

peaks

the list of turning points from peaksign

Value

list from 1 to nCycles, each repeated by the length of the cycle and the whole padded to the length of the original series. If no turning points are found (i.e. if the test was a ramp) then consider it all as cycle 1, so return just 1 repeated for the whole test.


yadbor/bluer documentation built on Jan. 31, 2023, 7:44 p.m.