peakdet {NADfinder} | R Documentation

## Detect peak positions

### Description

Detect the peak positions and valley positions leveraging github::dgromer/peakdet

### Usage

    peakdet(y, delta = 0, silence = TRUE)

### Arguments

`y` | A numeric vector for searching peaks
`delta` | A numeric vector of length 1, defining the minimum absolute changes required for local maximum or minimum detection when slope sign changes. If it is set to 0, the delta will be set to 1/10 of the range of y.
`silence` | logical(1). If false, echo the delta value when delta is set as 0.

### Value

A list with peakpos and valleypos. Both peakpos and valleypos are numeric vectors storing the positions of peaks or valleys.

### Examples

    y <- runif(200)
    peakdet(y)
    y <- sin(seq(0,20))
    peakdet(y)

[Package NADfinder version 1.12.0 Index]