which.peaks: Find local maxima and local minima

View source: R/whichPeaks.R

which.peaksR Documentation

Find local maxima and local minima

Description

Find local maxima and local minima

Usage

which.peaks(x, partial = FALSE, decreasing = FALSE)

Arguments

x

numerical vector contains local maxima (minima)

partial

logical value indicating if the two endpoints will be considered

decreasing

logical value indicating whether to find local minima

Value

a vector of locations of local maxima or minima

Examples

a = 100:1
which.peaks(a*sin(a/3))

zhibinghe/ChangePoint documentation built on Feb. 22, 2025, 12:34 p.m.