extrema: Create Local Extrema Object

Description Usage Arguments Author(s) References Examples

View source: R/extrema.R

Description

This function returns an S3 class, 'local.extrema', which contains local maxima and minima, the interval used to derive those extrema, and a data frame with xy coordinates that may be used for plotting.

Usage

1
extrema(x, interval, min_per_change = NA)

Arguments

x

A numeric vector or integer vector for use in determining local extrema.

interval

An integer value to specify the degree to which changes in local extrema should be calculated and identified.

min_per_change

A numeric value denoting the minimum change to recognize a reversal. Default value is NA. NA treated as there is no minimum for reversal.

Author(s)

mjfii

References

base

Examples

1
2
3
4
rv <- extrema(slv, 3)
rv$interval
rv$maxima
rv$minima

mjfii/Local-Extrema documentation built on May 24, 2019, 2:07 a.m.