local_maxima: Find local maxima in a vector of real values.

View source: R/various.R

local_maximaR Documentation

Find local maxima in a vector of real values.

Description

Find local maxima in a vector of real values.

Usage

local_maxima(x)

Arguments

x

A vector of real numbers

Value

A vector of integers corresponding to local maxima positions in vector x

Examples

t <- seq(-10,10,length=1000)
x <- dnorm(t,mean=3)+dnorm(t,mean=7)
yM <- local_maxima(x)

jfoadi/crone documentation built on Sept. 10, 2022, 4:34 p.m.