find_peaks function

Detect local maxima in time series

Detect local maxima in time series

Detects peaks in a vector and calculates the peak height. This function is only appropriate for symmetric gaussian peaks and does not take into account any baseline correction as it required in 'real word' data. Therefore, it does not substitute sophisticated peak detection and integration tools and is only used for illustration purposes in our vignettes.

find_peaks(df)

Arguments

  • df: A data frame containing x and y coordinates.

Returns

A data frame containing x and y coordinates of peaks.

Examples

## create df df <- data.frame(x = 1:1000, y = dnorm(1:1000,300,20)) ## plot with(df, plot(x,y)) ## detect peak find_peaks(df)

Author(s)

Meinolf Ottensmann (meinolf.ottensmann@web.de) & Martin Stoffel (martin.adam.stoffel@gmail.com)

  • Maintainer: Meinolf Ottensmann
  • License: GPL (>= 2) | file LICENSE
  • Last published: 2024-07-03