CheckRatio: A helper function for FindPeaks

Description Usage Arguments Value Author(s) Examples

View source: R/CheckRatio.R

Description

Checks whether a local minimum or maximum mets the criteria for an important local extrema based on the compression parameter R.

Usage

1
CheckRatio(ai, R, aMin = NULL, aMax = NULL)

Arguments

ai

Numeric, value at the current location in the time series.

R

Numeric, the compression parameter (greater than 1).

aMin

Numeric, value of the most recent local minimum in the time series.

aMax

Numeric, value of the most recent local maximum in the time series.

Value

Logical indicating whether the criteria (ratio > R) has been met.

Author(s)

Addison Klinke, agk38@case.edu

Examples

1
2
CheckRatio(ai = 6.1, R = 1.2, aMin = 5)   # returns TRUE
CheckRatio(ai = -1.3, R = 1.1, aMax = -1) # returns TRUE

addisonklinke/rainflow documentation built on Aug. 23, 2020, 10:48 a.m.