Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

peaks

Peaks


Description

Find peak amplitudes in a time series signal.

Usage

peaks(series, span = 3, do.pad = TRUE)

Arguments

series

signal

span

span for window

do.pad

padding

Details

This function originated in a note from Brian Ripley.

Value

vector of peak indexes

Author(s)

Brian Ripley

Examples

data(CE1)
plot(CE1$x, CE1$y, type='l')


pp <- seq(from=53, to=80, by=1)

plot(CE1$x[pp], CE1$y[pp], type='l')


aa <- peaks(CE1$y[pp], span=3)


abline(v=CE1$x[pp[aa]], col='red')

RSEIS

Seismic Time Series Analysis Tools

v3.9-3
GPL (>= 2)
Authors
Jonathan M. Lees [aut, cre], Jake Anderson [ctb], Leonard Lisapaly [ctb], Dave Harris [aut, cph]
Initial release
2020-08-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.