findLocalExtremes: whether a value in a sequence is a local extreme

Description Usage Arguments Examples

Description

the findLocalMin and findLocalMax functions take an object of type vector and return a boolean vector of the same length, that holds TRUE if the element is a local extreme. if there is a plateau, you will get the index of the first element in the plateau.

Usage

1

Arguments

x

a vector.

Examples

1
2
3
v <- c(1,2,3,4,3,2)
findLocalMax(v)
# returns c(FALSE, FALSE, FALSE, TRUE, FALSE, FALSE)

delftfews documentation built on May 2, 2019, 4:48 p.m.