local.min: Finds local minimas indices.

Description Usage Arguments Value Examples

Description

Seeks for local minimas in vector v using simple second order difference.

Usage

1

Arguments

v

numeric vector

Value

numeric vector with indices of local minima elements of vector v (i.e. where elements of second order difference equals 2)

Examples

1
2
3
4
v <- c(1,2,3,4,5,6,5,3,2,-1,-4,-3,-1,2,4,10,12,11,5,3)
idx <- local.min(v)
print(idx)
print(v[idx])

rz6/DIADEM documentation built on Dec. 31, 2019, 3:51 a.m.