lmax.locate: Locate Local Maxima

View source: R/functions.r

lmax.locateR Documentation

Locate Local Maxima

Description

Identifies local maxima in a sequence of y values corresponding to x coordinates. Used in kin.extract function.

Usage

lmax.locate(x, y)

Arguments

x

Numeric vector of x coordinates

y

Numeric vector of y values

Value

Logical vector indicating which x values correspond to local maxima

Examples

x <- 1:5
y <- c(1,2,3,2,1)
lmax.locate(x, y) # Returns c(FALSE,FALSE,TRUE,FALSE,FALSE)


ccamp83/mu documentation built on Nov. 7, 2024, 5:17 p.m.