localMinima: Find Local Minima in a vector

Description Usage Arguments Value Author(s) Examples

View source: R/localMinima.R

Description

Given a density object, find the position of local minima (inflection points)

Usage

1

Arguments

x

a vector of density values, as generated through a call to density

Value

a vector of index corresponding to local minima

Author(s)

Tommy http://stackoverflow.com/questions/6836409/finding-local-maxima-and-minima

Examples

1
2
3
4
x <- c(rnorm(100),rnorm(100,3))
dx <- density(x)
plot(dx)
abline(v=dx$x[localMinima(dx$y)],col=2,lty=2)

yannabraham/hilbertSimilarity documentation built on Dec. 4, 2019, 3:05 p.m.